In this example how do I know uuid of queue.job record, so I can use it in MyModel.my_method call?
from odoo import models, fields, api
from odoo.addons.queue_job.job import job
class MyModel(models.Model):
_name = 'my.model'
@api.multi
@job
def my_method(self, a, k=None):
_logger.info('executed with a: %s and k: %s', a, k)
class MyOtherModel(models.Model):
_name = 'my.other.model'
@api.multi
def button_do_stuff(self):
self.env['my.model'].with_delay().my_method('a', k=2)
I want to be able to link objects and all jobs related to them.
Thank you!
In this example how do I know
uuidofqueue.jobrecord, so I can use it inMyModel.my_methodcall?I want to be able to link objects and all jobs related to them.
Thank you!