I think we might have a bit of a terminology issue here. From the operating system's standpoint, web2py is a service. I'm not talking about that. When I say web2py service, I mean things that are strictly linked and (I dare say) actually are *meant* to run under web2py, but are not tightly coupled with the actual actions of the user (see session cleanup, cron tasks specific to the application). As a requirement, web2py services should be able to run under whatever platform and environment web2py is running from, something that is certainly not easily achieveable if this is done as a separate service.
As for Steve's concern, I've just sent a proof-of-concept patch to Massimo which does the above in a way that does not cause any detectable performance degradation for users. As for the last post, I don't see how you can control web2py services from a web2py application ? If you're not root, you have no access to init scripts (and you certainly don't want web2py to run as root). If you're running under mod_wsgi/fastcgi, you can't even control the current running process, much less influence the actual webserver web2py is behind. On Oct 9, 8:04 am, mdipierro <[EMAIL PROTECTED]> wrote: > Anyway.... it would be possibl, and I do not see anything wrong with, > creating a web2py app that provide an OS interface to start and stop > web2py services. > Anybody? > > Massimo > > On Oct 9, 12:41 am, mdipierro <[EMAIL PROTECTED]> wrote: > > > I agree with Steve. Running services from inside web2py is not clean. > > Consider that web2py threads are managed by the web server and are > > subject to many limitations because of security (timeout, limited > > permissions, etc.). Services instead are supposed to be managed by the > > os and may need to run without timeout and with less restrictive > > permissions. > > > Notice that you can create a folder "services" under you app and then > > start another instance of web2py from the shell using > > > nohup python web2py.py -S yourapp -M -R applications/yourapp/services/ > > yourservice.py & > > > On Oct 8, 8:57 pm, "Steve Shepherd" <[EMAIL PROTECTED]> wrote: > > > > Is this as a response to remoinvg the usage of CRON? > > > Does the overhead hurt Web2py performance? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---