Queue Controls (workflow settings and global)

The idea is:

Users need more control over queuing of jobs.

  1. add ability to set a queue limit in workflow settings
  2. add ability to set a global queue limit
  3. automatically purge queued jobs per-workflow for inactive (deactivated) workflows
  4. add ability to manually purge per-workflow job queue (queued jobs)
  5. add ability to manually purge global job queue (queued jobs)

My use case:

I have a backlog of jobs that queue indefinitely at the rate-of-schedule per workflow. This can create a massive backlog of queued jobs if the workers cannot keep up.

I think it would be beneficial to add this because:

  1. Limiting the number of queued jobs per workflow would prevent limitless queuing.
  2. Having the ability to purge existing queues (globally and per-workflow) would restore a clean state to the queuing mechanism.
  3. Deactivated jobs should no longer have queued jobs - it’s counter-intuitive as it stands, but open to debate - either way, it should be configurable.