Requeue a Job to automatically resume it too?

Our system has a script that will requeue a job to re-render it when triggered. However if a Job is currently suspended then a requeue wont resume the job. In fact it actually marks any completed tasks as suspended but leaves the job as suspended.

The way we’ve gotten around this so far is by always sending a resume command followed by a requeue. But that is basically twice the work to paper over a crack. I was wondering if there’s anywhere we can change this behaviour from the default? I understand that this might work for people who consider suspension to be an important state to hold the job in, but in our Repository a suspended job is basically just sitting dormant waiting to be turned on.

Similarly, we have to run a check on the job’s info to determine if it has dependencies. Because if we pend a job that has no dependencies it will remain pended until manually fixed. So we have to run a check to the repository and parse the information we get back, searching for repositories.

If there is a way to edit how jobs respond to the different states they’re set in then that’d solve both these problems.

This behavior has always bugged me. Re-queueing a completed task should put that task in the Queued state, not a separate state that the job tracks separately from the tasks.