-
-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] queue_job: remove cron garbage collector and automatically requ…
…eue jobs in timeout [IMP] queue_job: increment 'retry' when re-queuing job that have been killed
- Loading branch information
Showing
11 changed files
with
185 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) | ||
|
||
|
||
def migrate(cr, version): | ||
# Create job lock table | ||
cr.execute( | ||
""" | ||
CREATE TABLE IF NOT EXISTS queue_job_locks ( | ||
id INT PRIMARY KEY, | ||
CONSTRAINT | ||
foreign_key_queue_job | ||
FOREIGN KEY (id) | ||
REFERENCES queue_job (id) ON DELETE CASCADE | ||
); | ||
""" | ||
) | ||
|
||
# Deactivate cron garbage collector | ||
cr.execute( | ||
""" | ||
UPDATE | ||
ir_cron | ||
SET | ||
active=False | ||
WHERE id IN ( | ||
SELECT res_id | ||
FROM | ||
ir_model_data | ||
WHERE | ||
module='queue_job' | ||
AND model='ir.cron' | ||
AND name='ir_cron_queue_job_garbage_collector' | ||
); | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.