Background Jobs - PurposeOpen/Platform GitHub Wiki
The Platform uses background jobs to process a variety of tasks including:
- sending autofire emails
- cutting lists
- email blasts
Workers simultaneously cutting lists and blasting can cause users to receive more than one email per push depending on the timing of query execution. To prevent this, run only one worker process for list cutting and blasting.
Procfile in the project root defines separate processes for these tasks, which will satisfy the one worker rule above:
worker: QUEUE=${DEFAULT_QUEUE-default} bundle exec rake jobs:work
list_cutter_blaster: QUEUE=${LIST_CUTTER_BLASTER_QUEUE-list_cutter_blaster} bundle exec rake jobs:work