Changes between Version 32 and Version 33 of InstallationGuidelines/Linux/Server/CherokeePostgreSQL


Ignore:
Timestamp:
02/08/12 23:41:14 (13 years ago)
Author:
Praneeth Bodduluri
Comment:

Added scheduler

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/Linux/Server/CherokeePostgreSQL

    v32 v33  
    134134# Configure uwsgi
    135135
     136## Add scheduler config
     137
     138cat << EOF > "/home/web2py/run_scheduler.py"
     139#!/usr/bin/env python
     140# -*- coding: utf-8 -*-
     141
     142import os
     143import sys
     144
     145if '__file__' in globals():
     146    path = os.path.dirname(os.path.abspath(__file__))
     147    os.chdir(path)
     148else:
     149    path = os.getcwd() # Seems necessary for py2exe
     150
     151sys.path = [path]+[p for p in sys.path if not p==path]
     152
     153# import gluon.import_all ##### This should be uncommented for py2exe.py
     154import gluon.widget
     155from gluon.shell import run
     156
     157# Start Web2py Scheduler -- Note the app name is hardcoded!
     158if __name__ == '__main__':
     159    run('eden',True,True,None,False,"from gluon import current; current._scheduler.loop()")
     160EOF
     161
     162
    136163cat << EOF > "/home/web2py/uwsgi.xml"
    137164<uwsgi>
     
    142169        <script>wsgihandler</script>
    143170    </app>
     171    <mule>run_scheduler.py</mule>
    144172    <workers>4</workers>
    145173    <pidfile>/tmp/uwsgi-prod.pid</pidfile>