Skip to content

Commit

Permalink
[IMP] stock_quant_task_deferred: Use identity exact to not launch sev…
Browse files Browse the repository at this point in the history
…eral parallel quant tasks
  • Loading branch information
rousseldenis committed Nov 28, 2024
1 parent 2c47b58 commit 7dc2c37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stock_quant_task_deferred/models/stock_quant.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright 2024 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, models

from odoo.addons.queue_job.job import identity_exact


class StockQuant(models.Model):

Expand All @@ -23,4 +24,6 @@ def _quant_tasks_deferred(self):

@api.model
def _run_quant_tasks_deferred(self):
self.with_delay(description="Executing Quant Tasks")._quant_tasks_deferred()
self.with_delay(
description="Executing Quant Tasks", identity_key=identity_exact
)._quant_tasks_deferred()

0 comments on commit 7dc2c37

Please sign in to comment.