Skip to content

Commit bde03d6

Browse files
committed
Merge PR #629 into 14.0
Signed-off-by simahawk
2 parents 249ee17 + fe4fe95 commit bde03d6

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

queue_job/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "Job Queue",
5-
"version": "14.0.3.5.1",
5+
"version": "14.0.3.5.2",
66
"author": "Camptocamp,ACSONE SA/NV,Odoo Community Association (OCA)",
77
"website": "https://github.com/OCA/queue",
88
"license": "LGPL-3",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
2+
3+
from odoo.tools.sql import table_exists
4+
5+
6+
def migrate(cr, version):
7+
if table_exists(cr, "queue_job"):
8+
# Drop index 'queue_job_identity_key_state_partial_index',
9+
# it will be recreated during the update
10+
cr.execute("DROP INDEX IF EXISTS queue_job_identity_key_state_partial_index;")

queue_job/models/queue_job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def init(self):
139139
self._cr.execute(
140140
"CREATE INDEX queue_job_identity_key_state_partial_index "
141141
"ON queue_job (identity_key) WHERE state in ('pending', "
142-
"'enqueued') AND identity_key IS NOT NULL;"
142+
"'enqueued', 'wait_dependencies') AND identity_key IS NOT NULL;"
143143
)
144144

145145
@api.depends("records")

0 commit comments

Comments
 (0)