Hi all, I'm in the process of releasing an app written in web2py that use extensively the scheduler. It's going to be used on desktops, but I'd like to keep my mind open and if someone will want to load it into apache/nginx/uswgi, why not ?
For the intrinsic nature of the app, some logic is completely decoupled from the webserver and put in the scheduler, with the web app actually scheduling and polling with ajax for results. As soon as I figure out the license type, run a major cleanup and learn to use hg-git to test github, I'll release the app to the public, and I'll ask a ton of questions here :P I had a design issue for "cron execution" of a scheduler, that was "easily" fixed with the -E option of gluon/scheduler.py .... Now, another one faces up: would it be possible to start/stop the scheduler process from within web2py ? I'm familiar with the idea that spawning processes without waiting for them is not a good call on a web app, nor webapps are good candidates for managing states like "terminating myself" but nonetheless I'll ask here for your ideas..... I don't mind having the scheduler always active 24/7 but it would be nice for a desktop app to be able to terminate the scheduler when it exits (or in the case of "open minded" case, having a disposable scheduler started on purpose, that will die on itself when no tasks are found). What I'd like to do is something like : - having the scheduler set with "max_empty_runs" to a nice amount of 20 or so - have a method to start it (obviously I'll add some tasks to do before) - let it run the tasks and then die if there aren't new tasks to do The scheduler is a nice piece of code, and it was coded with a different intent: have a process (or several of them) always active and eager to do tasks for "typycal" webapplications run on servers.