please read the docs for the scheduler .... group_names is meant as a way 
to allow sending tasks to a (or more) specific workers.

Any task queued without the group_name parameter gets a default of 'main', 
that indeed is included in the default value of group_names of the 
scheduler.

Of course, given that you "want to play" with group_name(s) means that if 
you change the defaults you then need to pass sensible arguments to make 
your tasks eligible of being processed..............e.g. you use 
group_names = ['foo', 'bar', 'baz'] in the Scheduler istantiation and use 
either 'foo' or 'bar' or 'baz' queuing tasks.


On Friday, May 2, 2014 12:42:07 AM UTC+2, Peter wrote:
>
> I was having trouble with the scheduler being stuck on QUEUE when I've 
> used any group_name other than 'main'. I've looked in the code and noticed 
> the following:
>
> https://github.com/web2py/web2py/blob/master/gluon/scheduler.py
>
> For line 492 in scheduler.py file..
>
> 491 def __init__(self, db, tasks=None, migrate=True,
> 492                 worker_name=None, group_names=['main'], 
> heartbeat=HEARTBEAT,
> 493                 max_empty_runs=0, discard_results=False, utc_time=False):
>
>
> Are the group_names hardcoded? When I've updated the list to include new 
> group names (e.g. group_names=['main','123','xyz']) I was able get my 
> queued task processed. I looked over the code and didn't see anything that 
> would append the name to the list.
>
> Would it be better to have group_names check something like 
> group_names=IS_IN_SET(db.schedule_task.status) for new names rather than 
> hard-coding 'main'?
>
> What do you think about this?
>
> Thank you,
>
> Peter
>

-- 
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.

Reply via email to