OCA / queue

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

Getting exception on failed jobs message posting #299

Closed mjunaidtajawal closed 3 years ago

mjunaidtajawal commented 3 years ago

Dear Folks,

I am getting the following exception, while i am using version13.0 with the latest updates of queue

AttributeError: 'queue.job' object has no attribute 'message_subscribe' - - -
File "/opt/application/src/odoo13-addon-queue-job/queue_job/models/queue_job.py", line 246, in _message_post_on_failure
self._message_post_on_failure()
db_record.with_context(_job_edit_sentinel=edit_sentinel).write(vals)
self.message_subscribe(partner_ids=users.mapped("partner_id").ids)
File "/opt/application/src/odoo13-addon-queue-job/queue_job/models/queue_job.py", line 203, in write
 job.store()
File "/opt/application/src/odoo13-addon-queue-job/queue_job/controllers/main.py", line 108, in runjob
File "/opt/application/src/odoo13-addon-queue-job/queue_job/job.py", line 561, in store
response = f(*args, **kw)
return self.method(*args, **kw)
File "/opt/application/src/odoo/odoo/http.py", line 515, in response_wrap
File "/opt/application/src/odoo/odoo/http.py", line 915, in __call__
result = self.endpoint(*a, **kw)

Any help would be appreciated Thanks

guewen commented 3 years ago

Hi,

message_subscribe is provided by the mail.thread model, which queue.job inherits.

Not sure why the method would not be available here...