sorentwo / oban

💎 Robust job processing in Elixir, backed by modern PostgreSQL and SQLite3
https://getoban.pro
Apache License 2.0
3.18k stars 297 forks source link

Queue allowlist/denylist support for Lifeline Plugin #1018

Closed beeberino closed 6 months ago

beeberino commented 6 months ago

An issue that we have is that we are unable to enable/disable queues using the lifeline plugin.

We have for instance a workflow with:

Event 1 -> Notification job for event 1 [state1] Event 2 -> Notification job for event 2 [state2] (job is orphaned) Event 3 -> Notification job for event 3 [state3] Notification job for event 2 [state2] rescued and sends outdated data

We would like a queue-based allowlist/denylist so that we can prevent the Lifeline plugin from rescuing jobs on this queue.

As far as I am aware, that isn't possible to configure now (or possibly it isn't documented). If there is a better solution available, we would also be very interested.

sorentwo commented 6 months ago

The Lifeline plugin is simplistic with minimal functionality. As noted in the module docs:

This plugin may transition jobs that are genuinely executing and cause duplicate execution. For more accurate rescuing or to rescue jobs that have exhausted retry attempts see the DynamicLifeline plugin in Oban Pro.

If the DynamicLifeline isn't a viable alternative, you may need to build something custom to handle your use case.