We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 506afd8 commit fd40332Copy full SHA for fd40332
awsf3/utils.py
@@ -379,6 +379,16 @@ def upload_to_output_target(prj_out, encrypt_s3_upload=False):
379
output_argnames = prj_out.output_files.keys()
380
output_target = prj_out.alt_output_target(output_argnames)
381
382
+ # sorting outputs by mtime in order to upload in the right order.
383
+ # arbitrary order created issues with workflow managers (snakemake)
384
+ # because S3 does not save the modification time of uploaded objects
385
+ output_target = dict(
386
+ sorted(
387
+ output_target.items(),
388
+ key=lambda i: os.path.getmtime(i[0].replace('file://', ''))
389
+ )
390
391
+
392
for k in output_target:
393
target = Target(output_bucket)
394
0 commit comments