Is your feature request related to a problem? Please describe.
Support for exporting multiple campaigns at once was introduced by #1641 - but part of the desired behavior was punted in order to unblock merge. Currently, when admins export multiple campaigns they receive one email per campaign exported with links to the relevant urls. Instead, admins should receive one email per bulk operation, with links to each exported campaign's data.
Describe the solution you'd like
Currently, the export-multiple-campaigns wraps the export-campaign task, dispatching one task per campaignId included in the payload. The export-multiple-campaigns task should be refactored to:
dispatch individual jobs per campaign exported (but not send an email after the exports run)
collect the generated links to exported campaign data
send an email to the admin with the links for each campaign
Describe alternatives you've consideredgraphile-worker has built-in support for batch jobs, but it's unclear if the use-case fits our needs. It would also likely mean that the multiple vs. single campaign export workflows would deviate significantly, which might lead to confusion or trouble down the line.
Is your feature request related to a problem? Please describe. Support for exporting multiple campaigns at once was introduced by #1641 - but part of the desired behavior was punted in order to unblock merge. Currently, when admins export multiple campaigns they receive one email per campaign exported with links to the relevant urls. Instead, admins should receive one email per bulk operation, with links to each exported campaign's data.
Describe the solution you'd like Currently, the
export-multiple-campaigns
wraps theexport-campaign
task, dispatching one task percampaignId
included in the payload. Theexport-multiple-campaigns
task should be refactored to:Describe alternatives you've considered
graphile-worker
has built-in support forbatch
jobs, but it's unclear if the use-case fits our needs. It would also likely mean that the multiple vs. single campaign export workflows would deviate significantly, which might lead to confusion or trouble down the line.