[16.0][IMP] queue_job: Requeue stuck jobs channel-based config #669
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
enqueued_delta
andstarted_delta
parameters on a channel by channel basis. If not set it will use the global value set in the cronstarted
when the Odoo gets automatically deployed, in order for it to be mostly invisible to the end user and not have a blocked queue for long, the value should be low (5 or so). But we have some other processes that due to the length get sent to background tasks as jobs and might exceed this 5 minute mark, causing them to requeue infinitely. The ideal situation is optimizing the job or refactoring the whole thing to have <5min jobs but being able to allow some jobs to be longer is much more convenient and often will be enough of a solution to the issue.Some extra notes
[("channel", "not in", searched_channels)]
part of the domain is for jobs that are created in a specific channel but without creating the correspondingqueue.job.channel
record, I would deem it technically a poor usage by the job creator (I have done it before) but it would be a regression for these cases if not taken into account