Skip to content

campaign-exports: send one email per bulk export operation #1660

@henryk1229

Description

@henryk1229

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 considered
graphile-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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions