Connectors mailing list archives

connectors@odoo-community.org

Avatar

Re: Delayed execution of jobs

by
Open Source Integrators, Maxime Chambreuil
- 13/06/2019 17:55:26
Thank you Laurent. We will try that tomorrow.

Have a great evening!

MAXIME CHAMBREUIL
PROJECT MANAGER/CONSULTANT
O: 1.855.877.2377 EXT. 710
M: 602.427.5632
E: MChambreuil@OpenSourcelntegrators.com
P.O. BOX 940, HIGLEY, AZ 85236



On Thu, Jun 13, 2019 at 9:57 AM Mignon, Laurent <laurent.mignon@acsone.eu> wrote:
Hi Maxime,

When delaying a method with queue_job you can specify the eta..... (https://github.com/OCA/queue/blob/12.0/queue_job/job.py#L224)


class XYZ(models.Model):
     _name = 'xyz'
   
    @job
    def my_method(self)
        pass

...

self.env["xyz"].browse(1).with_delay(eta=....).my_method()


Regards,

lmi


On Thu, Jun 13, 2019 at 4:42 PM Maxime Chambreuil <mchambreuil@opensourceintegrators.com> wrote:
Hello,

We are working on a connector with Voicent, a telephony platform, to automatically call customers when a helpdesk ticket or field service order is completed.

As we can't call the customer in the middle of the night, the voicent backend defines times to call, like 10am, 2pm, 4pm.

We are creating a job in the queue when the ticket or order is completed (at 7pm) but we want to delay the execution of the job by the worker until the next day at 10am. The problem is that the worker executes the job immediately and marks it as Done.

Do you have any suggestions to work around this issue?


Thank you.

MAXIME CHAMBREUIL
PROJECT MANAGER/CONSULTANT
O: 1.855.877.2377 EXT. 710
M: 602.427.5632
E: MChambreuil@OpenSourcelntegrators.com
P.O. BOX 940, HIGLEY, AZ 85236

_______________________________________________
Mailing-List: https://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/connectors-30
Post to: mailto:connectors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference