I knew there are bunch of different approaches to implement what I need, the one I prefer is to use enabled=False/True but by doing that we are moving that feature (in my view it belongs to the scheduler) in the function code. In that case, I have to reinvent the wheel, actually I have also to hard core it, for each function I have to run in that manner. Moreover, I don't have much control. I can create a wrapper to flip the enable=True/False, but at that point, the wrapper could be placed in the scheduler, by setting enable=False before executing tasks defined as 'concurrent=False'? isn't? I agree with you, this is not a corner case, and to be honest, I also need tasks dependencies for other elaborations :P
Paolo 2014-05-02 21:21 GMT+02:00 Niphlod <niph...@gmail.com>: > What's the "general" use case ? > There are a bunch of simple different things you can do right in the > current scheduler to achieve that goal.... > - schedule the same with different start_time(s) > - queue the first with enabled=True and the following with enabled=False > with a callback that flips the enabled bit for the next one > - use an external "lock" record to coordinate > - use a task that coordinates "subtasks" (always flipping the enabled bit) > - etc etc etc > > TBH, I see other things as useful for a lot of cases (i.e. tasks > dependencies, e.g. task A needs to run before task B)....right now this > feels like a corner case. It's also a bit difficult to implement without > external tables, but that's another story....if it's useful we'll make it > work ^_^ > > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/BGwg4ky6QB4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.