Uh oh!
There was an error while loading. Please reload this page.
[11.0][ADD] queue_job_batch - #151
Conversation
etobella
commented
Jun 30, 2019
ping @jbeficent @jarroyomorales |
| <div> | ||
| <button type="button" class="btn btn-sm o_filter_button active">Job groups</button> | ||
| </div> | ||
| <button type="button" class="btn btn-sm o_view_all_group_jobs"> View All </button> |
There was a problem hiding this comment.
Maybe you could add this style to the view all button, I think it will fit more
.o_view_all_group_jobs {
.btn-link;
padding: 5px;
}
jarroyomorales
left a comment
There was a problem hiding this comment.
LGTM, and very useful module 👍
guewen
commented
Jul 1, 2019
Looks interesting, I'll take some time for reviewing asap. |
etobella
commented
Jul 1, 2019
Dependencies should be used on a graph of jobs, this tries to solve when you need to know when one has finished (order is not important). It could be a special case of your implementation, but it is easier to solve this use case. I don't know if this happens in other cases, but we could use it in a lot of places (validation of multiple invoices, generation of contract invoices...) |
guewen
commented
Jul 1, 2019
If I rephrase, the groups are used to show the group's state to users, but they are not used to delay dependent jobs, do I understand correctly?
Yes probably, I think that with my implementation proposal, we could propose a view of the graph. Anyway, my proposal is only what it is now: a proposal with no time yet to implement it, when you have an implementation for your use case. I only want to avoid 2 solutions to grow concurrently in different directions, but I recon that should not be the case here. |
etobella
commented
Jul 1, 2019
sbidoul
commented
Jul 1, 2019
Nice feature! A quick question: is the new "waiting" state on queue jobs absolutely necessary? |
Probably not, but I think that you need to wait to enqueue all the jobs. For that reason, I created this state. Do you think that it is better to create the job without checking the state? |
guewen
commented
Jul 1, 2019
As |
guewen
commented
Jul 1, 2019
Or maybe it isn't? Regarding the naming, would you accept to rename Group to Batch to prevent a confusion with the Group notion of #129? (I'd like to keep the Group term in the dependencies if possible to keep the same terms than celery) |
etobella
commented
Jul 1, 2019
sure! I will change it batch. |
etobella
commented
Jul 1, 2019
@guewen Changed to batch 😄 |
etobella
commented
Jul 4, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JordiBForgeFlow
left a comment
There was a problem hiding this comment.
Tested with #155 and works very well!
OCA-git-bot
commented
Jul 8, 2019
This PR has the |
etobella
commented
Jul 8, 2019
@jbeficent Comments attended 😄 |
sbidoul
commented
Jul 8, 2019
I'm still not convinced a new job state is needed for this, even if jobs are created in several transactions. Would it be a problem if jobs starts while being in a draft batch? |
etobella
commented
Jul 8, 2019
Well, it is not a problem for me to remove the state. @jbeficent What do you think? |
etobella
commented
Jul 8, 2019
@sbidoul I removed the state. I think this solutions is a better approach for you comments |
guewen
left a comment
There was a problem hiding this comment.
Thanks for the changes, this is great :)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JordiBForgeFlow
commented
Jul 9, 2019
/ocabot merge |
OCA-git-bot
commented
Jul 9, 2019
What a great day to merge this nice PR. Let's do it! |
OCA-git-bot
commented
Jul 9, 2019
Congratulations, your PR was merged at 0e4aba3. Thanks a lot for contributing to OCA. ❤️ PS: Don't worry if GitHub says there are unmerged commits: it is due to a rebase before merge. All commits of this PR have been merged into |

When you split a single process in small processes managed with queue you may have problems in order to know that everything finished. For example, if you try to execute 1000 contracts, you may want to split them by customer and execute a job for each customer. But you are unable to know that everything finished.
This PR tries to solve this issue creating Queue Job Groups.
It allows to show your jobs in a grouped form in order to know better the
results.
In the snippet of code above, when we call
button_do_stuff, 100 jobscapturing the method and arguments will be postponed. It will be executed as
soon as the Jobrunner has a free bucket, which can be instantaneous if no other
job is running.
Once all the jobs have finished, the grouper will be marked as finished.
You can manage your group jobs from the Systray. A new button will be shown
with your currently executing job groups and the recently finished job groups.
A testing module is installed in order to test that everything works as expected.