OCA / queue

Asynchronous Job Queue
GNU Affero General Public License v3.0
183 stars 460 forks source link

[V16-queue_job] Problems with multiple databases #503

Closed asierneiradev closed 1 year ago

asierneiradev commented 1 year ago

Currently the queue_job module is not running jobs when multiple databases are available.

It returns errors when executing jobs because it is not able to get a proper environment for the database as Odoo is providing the response without the associated database.

The error occurs in the file queue/queue_job/controllers/main.py, line 75, in runjob

env = http.request.env(user=SUPERUSER_ID)
TypeError: 'NoneType' object is not callable

After this error, the job is re-queued and set to pending status.