Created
February 11, 2012 06:03
-
-
Save lifeeth/1796893 to your computer and use it in GitHub Desktop.
Scheduler process spawning for Web2py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
# Note the app name is hardcoded! | |
APPLICATION = 'eden' | |
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()") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment