> > The main group worker got created even though I didn't call it... Not sure > why, but i guess because there are lot of leftover tasks queued (500k) and > some were assigned when I stopped the process. > > Remind that a group_name for tasks is required for the scheduler to work. However, the default value is 'main', so when you do db.scheduler_task.validate_and_insert(function_name='test') what is really happening is db.scheduler_task.validate_and_insert(function_name='test', group_name='main')
If you start a scheduler with default values, it processes tasks with group_name = 'main', so when you do web2py.py -K crm what is really happening is web2py.py -K crm:main This is meant to avoid the hassle of group_name(ing) tasks for users that don't need different group_names but allow "power-users" (like you :P) with the added flexibility of having different ones. --