Thank you, that has crossed my mind but I would then have to create another abstraction on top of the Scheduler groups to represent, well... groups. I even thought of conventions like common prefixes to identify which "user-group" belongs to which "group-group". Anyway, I gave up on the idea and is it looked to cluttered and implemented this functionality on the Scheduler, will submit a PR in case you are interested.
Basically, all you do is to create a task with broadcast=True and it should hit all the workers within the assigned worker_group. This should work even if new workers join the group later on and it should also work for both one-off tasks or tasks with an unlimited number of repeats. Finally, if you stop / disable / delete the broadcast task, no more tasks should be triggered like it, so you stop broadcasting. Happy to document this better, if are you happy to include it. Kind regards, Francisco On Tuesday, 8 May 2018 19:52:29 UTC+1, Niphlod wrote: > > hint: if the api doesn't allow it, it's not an envisioned scenario. > > That being said, there's no limit on the worker-group configuration. > As auth relies on RBAC, workers rely on groups. > A particular group is able to process a given task ? Queue the task > assigning the correct group. > Only one worker is able to process tasks of a specific group ? voilĂ ! > It's perfectly fine to run 10 workers and have 10 groups, even if each > group holds just one worker... > > On Monday, May 7, 2018 at 8:13:02 PM UTC+2, Francisco Ribeiro wrote: >> >> I have been testing my own hypothesis, it didn't work. I was unable to >> assign a task to a specific worker, I can only assign tasks to groups. >> Please correct me if I am wrong... >> >> On Sunday, 6 May 2018 16:16:08 UTC+1, Francisco Ribeiro wrote: >>> >>> Thank you for confirming. >>> >>> I presume that I still can take a list of workers belonging to a single >>> group and assign the same task multiple times (once per worker), which >>> would still suit my needs (expect if i want to cancel it for whatever >>> reason which becomes harder / less convenient). Do you see any problem >>> doing that? >>> >>> On Sunday, 6 May 2018 04:16:53 UTC+1, Massimo Di Pierro wrote: >>>> >>>> No. I do not believe there is any way to guarantee that every work will >>>> execute the same task. >>>> >>>> >>>> On Friday, 4 May 2018 17:36:30 UTC-5, Francisco Ribeiro wrote: >>>>> >>>>> The question refers to submitting a task simultaneously to all workers >>>>> within a group. >>>>> >>>>> Thank you >>>>> >>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

