Duke-GCB / D4S2

Web service to facilitate notification and transfer of projects in DukeDS
MIT License
0 stars 0 forks source link

Run s3 bucket transfer in the background #147

Closed johnbradley closed 6 years ago

johnbradley commented 6 years ago

Adds django-background-tasks to perform background operation. This requires a separate process: python manage.py process_tasks

The bucket transfer consists of 4 steps:

django-background-tasks will retry failed tasks up to 25 times (this is configurable). django-background-taskslimits a task to 1 hour (this is also configurable).

Adds an additional accepted_recipient email template type.

Changes accepted screen, for s3 deliveries only, to communicate the delivery is being transferred. Example transferring a project named testb6:

screen shot 2018-05-07 at 11 32 07 am

Fixes #133

johnbradley commented 6 years ago

@dleehr This is ready for another look.

dleehr commented 6 years ago

Thanks. I think that's easier to follow, but now as I read:

https://github.com/Duke-GCB/D4S2/blob/e68a246fc6ba81a31a3cad284d2d75300eee62b0/switchboard/s3_util.py#L31-L37

I'm not sure why set_failed_and_record_exception is a static method in BackgroundFunctions. Seems like it makes more sense as an instance method on S3TransferOperation.