// Create a ComputedFile for the sample,
// sync it S3 and save it.
try:
computed_file = ComputedFile()
computed_file.absolute_file_path = sample.source_absolute_file_path
computed_file.filename = sample.source_filename
computed_file.calculate_sha1()
computed_file.calculate_size()
computed_file.result = result
computed_file.sync_to_s3(S3_BUCKET_NAME, computed_file.sha1 + "_" + computed_file.filename)
// TODO here: delete local file after S3 sync
computed_file.save()
except Exception:
logger.exception("Exception caught while moving file %s",
raw_path,
processor_job=job_context["job_id"])