Skip to main content
Warning This document has not been updated for a while now. It may be out of date.
Last updated: 15 Apr 2016

travel-advice-publisher: Publish and Notification Workflow

The act of ‘publishing’ an edition initiates a job with an ordered sequence of tasks that send the content to the publishing api and trigger an email alert via the email alerts api.

The tasks order is validated to ensure that the email notification is always the final one.

The last task (delivery of email via the email-alert-api) queues up a new Sidekiq job only if the previous tasks completed successfully (publishing has succeeded).

The Workflow

The publish action builds an array of four tasks.

If one of the first three actions fails for whatever reason, the Sidekiq job fails and the retry mechanism kicks in (retries at exponentially increasing intervals up to 25 times in 21 days before being moved to the ‘dead’ queue).

Once the first three actions have succeeded, the fourth action enqueues a new job to send the email notification command to email alerts api. This job can then fail/retry/succeed as above.

Publishing/Alert Status

The publisher currently has no view on the status of the publishing or email alert. Once they click Publish and the job is queued, a flash message is displayed - Barbados travel advice published. which at that point is not necessarily the case.