Skip to content

Commit 82fff58

Browse files
committed
Update code to allow jobs requeing.
1 parent e673218 commit 82fff58

File tree

4 files changed

+25
-55
lines changed

4 files changed

+25
-55
lines changed

queue_job/README.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -584,22 +584,6 @@ Known issues / Roadmap
584584
* After creating a new database or installing ``queue_job`` on an
585585
existing database, Odoo must be restarted for the runner to detect it.
586586
587-
* When Odoo shuts down normally, it waits for running jobs to finish.
588-
However, when the Odoo server crashes or is otherwise force-stopped,
589-
running jobs are interrupted while the runner has no chance to know
590-
they have been aborted. In such situations, jobs may remain in
591-
``started`` or ``enqueued`` state after the Odoo server is halted.
592-
Since the runner has no way to know if they are actually running or
593-
not, and does not know for sure if it is safe to restart the jobs,
594-
it does not attempt to restart them automatically. Such stale jobs
595-
therefore fill the running queue and prevent other jobs to start.
596-
You must therefore requeue them manually, either from the Jobs view,
597-
or by running the following SQL statement *before starting Odoo*:
598-
599-
.. code-block:: sql
600-
601-
update queue_job set state='pending' where state in ('started', 'enqueued')
602-
603587
Changelog
604588
=========
605589

queue_job/models/queue_job_lock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ class QueueJobLock(models.Model):
1313
required=True,
1414
ondelete="cascade",
1515
index=True,
16-
)
16+
)

0 commit comments

Comments
 (0)