-
-
Couldn't load subscription status.
- Fork 522
Description
When scheduling a complex job shouldn’t the job use the jobrunner for each part of the job?
Module
Queue_job
Describe the bug
Given a complex job:
Chain(
self.delayable().job1(),
group(
chain(
self.delayable().subjob(1),
self.delayable().subjob(2),
……..
self.delayable().subjob(N)
),
chain(….),
),
self.delayable().anotherjob()
).delay()
If each job takes 10sec, and the limit of execution is low like 100sec and N > 100
This gives a total execution time greater than the limit of 100s which triggers the timeout. Same would happen without splitting the job into several subjobs.
Since with or without subjobs the limit is reached, doesn’t all this defeat the purpose of splitting the original job?
I mean, ok, the original job is long and reaches the timeout, so we split it. But by splitting the job, we expect that each subjob MUST be under the time limit, and even that the entire chain of subjobs executes over the limit, this shouldn’t be a problem.
But, actually the entire chain is executed as it is a single job, and as such, beeing forcebly stopped with timeout.
Expected behavior
Job running completly, given that each subjob runs under the time limit.
Additional context
Odoo 18, python 3.12
Thank you