Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][IMP] queue_job: Requeue stuck jobs channel-based config #669

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

hildickethan
Copy link
Member

  • Add the option to configure the enqueued_delta and started_delta parameters on a channel by channel basis. If not set it will use the global value set in the cron
  • The use case we have for this is that we use the cron to catch any jobs that get stuck in started 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

  • The domain it generates is much bigger than the previous one depending on the number of channels, but the cron execution was still instantaneous during my tests on a database with 26 channels and 3.5m job records
  • The [("channel", "not in", searched_channels)] part of the domain is for jobs that are created in a specific channel but without creating the corresponding queue.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

@OCA-git-bot
Copy link
Contributor

Hi @guewen,
some modules you are maintaining are being modified, check this out!

Copy link

github-actions bot commented Nov 3, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants