Uh oh!
There was an error while loading. Please reload this page.
[18.0][PORT] queue_job: remove dead jobs requeuer cron and automatically requeue dead jobs - #749
Conversation
OCA-git-bot
commented
Mar 3, 2025
Hi @guewen, |
11688d3 to
58bf17fComparehbrunn
commented
Mar 21, 2025
@sbidoul looks like you have to rewrite this to use savepoints? |
sbidoul
commented
Mar 21, 2025
I'm note sure it's possible to test that with savepoints, since we test database locks. |
| self.assertEqual(1, len(locks)) | ||
| # commit to update queue_job records in DB | ||
| self.env.cr.commit() # pylint: disable=E8102 |
There was a problem hiding this comment.
Yes, otherwise, the row representing a 'lock' will not be created within the db
| job_obj.set_started() | ||
| job_obj.store() | ||
| self.env.cr.commit() # pylint: disable=E8102 |
There was a problem hiding this comment.
Here we could maybe create a job with demo data, and run this test post install.
There was a problem hiding this comment.
Using data to create some records within the db might be a way to avoid to commit within tests, I'll think about it 👍
| WHERE | ||
| module='queue_job' | ||
| AND model='ir.cron' | ||
| AND name='ir_cron_queue_job_garbage_collector' |
42a1df0 to
f64b966CompareAnizR
commented
Jun 2, 2025
@hbrunn, I came up with the solution of loading test What do you think about it? |
5fd02bb to
dca717bCompare| model="queue.job" | ||
| eval="('test_enqueued_job',)" | ||
| /> | ||
| </odoo> |
There was a problem hiding this comment.
@AnizR this file should be removed as it was moved to test_queue_job?
57d2771 to
d071197Compare
simahawk
left a comment
There was a problem hiding this comment.
LGTM. Remember to merge w/ nobump.
sbidoul
commented
Aug 20, 2025
Setting as draft. There is a conflicts and the tests need some rework. |
…eue jobs in timeout [IMP] queue_job: increment 'retry' when re-queuing job that have been killed
A model is better than a manually managed table as it will protect the table from deletion by database_cleanup.
AnizR
commented
Sep 15, 2025
I reworked the tests and decided to isolate the tests in |
OCA-git-bot
commented
Sep 15, 2025
This PR has the |
sbidoul
commented
Sep 17, 2025
/ocabot merge major |
OCA-git-bot
commented
Sep 17, 2025
On my way to merge this fine PR! |
OCA-git-bot
commented
Sep 17, 2025
Congratulations, your PR was merged at c6f5ba8. Thanks a lot for contributing to OCA. ❤️ |
FW port of #748 + #816