Skip to content

queue_job_lock table not created on install — causes psycopg2.errors.UndefinedTable in jobrunner requeue #847

@django-frog

Description

@django-frog

Summary

After installing the latest version of queue_job (post-September 2025 batch), the jobrunner fails with a psycopg2.errors.UndefinedTable error because the table queue_job_lock is never created — even on a fresh database installation.

The model queue.job.lock is correctly defined and imported, but the corresponding SQL table does not exist in PostgreSQL.

Traceback

Traceback (most recent call last):

  File "/mnt/extra-addons/queue_job/jobrunner/runner.py", line 601, in run

    self.requeue_dead_jobs()

  File "/mnt/extra-addons/queue_job/jobrunner/runner.py", line 507, in requeue_dead_jobs

    db.requeue_dead_jobs()

  File "/mnt/extra-addons/queue_job/jobrunner/runner.py", line 404, in requeue_dead_jobs

    cr.execute(query)

psycopg2.errors.UndefinedTable: relation "queue_job_lock" does not exist

LINE 45:                         queue_job_lock


Environment

  • Odoo version: 18.0 (Enterprise)
  • queue_job version: main branch, latest (October 2025)
  • Python: 3.12
  • PostgreSQL: 12
  • Deployment: Dockerized Odoo environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions