It would be nice to have an endpoint that could trigger a queue worker to process the bulletin queue for all queue items before the timestamp passed to the endpoint so that an external service like Jenkins could trigger the queue processing.

Then endpoint (route) should be `/api/govdelivery_bulletins/queue?EndTime=[timestamp]`

It should have an UI killswitch that would disable the endpoint and make it return 404

The endpoint should pass back 200 response with success messages? or a failure response with success and failure messages (possible that 3 queue items succeeded and 1 failed.)

If no timestamp is passed, the route should probably be a 404.

Comments

swirt created an issue. See original summary.

swirt’s picture

Issue summary: View changes
swirt’s picture

Issue summary: View changes
swirt’s picture

Assigned: Elijah Lynn » swirt
swirt’s picture

The endpoint is now created. but the queue worker does not exist yet, So I created a new issue https://www.drupal.org/project/govdelivery_bulletins/issues/3099203

  • swirt committed cdde79b on 8.x-1.x
    Issue #3095847: Add Queue trigger endpoint
    
swirt’s picture

Status: Active » Fixed

In this MVP the endpoint returns either a 404 or 200. With the 200, there is only a simple text message. It does not handle cases of partial sucess or failure.

swirt’s picture

Status: Fixed » Closed (fixed)