I don't think webfaction allows you to have a resident process active beside the web-serving one.
On Wednesday, September 10, 2014 12:35:25 PM UTC+2, Zbigniew Pomianowski wrote: > > Hi, I tried this apporach: > http://blog.lifeeth.in/2012/02/uwsgi-mule-magic-and-web2py-scheduler.html > > My config.xml for uwsgi: > <uwsgi> > <uid>web2py</uid> > <gid>web2py</gid> > <virtualenv>/home/user/webapps/web2py/env</virtualenv> > <http>:25903</http> > > <pythonpath>/home/user/webapps/web2py/web2py</pythonpath> > <module>wsgihandler</module> > <socket>/tmp/web2py.sock</socket> > <master/> > <cheaper-algo>spare</cheaper-algo> > <cheaper>1</cheaper> > <workers>6</workers> > <mule>run_scheduler.py</mule> > <cheaper-step>1</cheaper-step> > <cheaper-rss-limit-soft>402653184</cheaper-rss-limit-soft> > <harakiri>30</harakiri> > <reload-mercy>8</reload-mercy> > <max-requests>2000</max-requests> > <limit-as>512</limit-as> > <buffer-size>2048</buffer-size> > <post-buffering>1024</post-buffering> > <reload-on-as>256</reload-on-as> > <reload-on-rss>192</reload-on-rss> > <memory-report/> > <disable-logging/> > <daemonize>uwsgi.log</daemonize> > </uwsgi> > > run_scheduler.py (in web2py dir): > #!/usr/bin/env python > # -*- coding: utf-8 -*- > import os > import sys > > # Note the app name is hardcoded! > APPLICATION = 'myapp' > > if '__file__' in globals(): > path = os.path.dirname(os.path.abspath(__file__)) > os.chdir(path) > else: > path = os.getcwd() # Seems necessary for py2exe > > sys.path = [path]+[p for p in sys.path if not p==path] > > import gluon.widget > from gluon.shell import run > > # Start Web2py Scheduler > if __name__ == '__main__': > run(APPLICATION,True,True,None,False,"from gluon import current; > current._scheduler.loop()") > > > When I run scheduler manually from a console (with venv) - it is ok. But i > need to pass -p 25903. When I try a mule - it does not work. > I use webfaction server. The problem is that when I launch the scheduler > from console it runs until the ssh session is active. > -- 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.