Exemple #1
0
def run(LIVE=False):

    # Do not run as live unless this module is main
    if __name__ != "__main__":
        LIVE = False

    # Run the web server
    serverApp = Server()
    serverApp.start()

    # Run MetroEscalators twitter App
    escalatorApp = EscalatorApp(LIVE=LIVE)
    escalatorApp.start()

    # Run MetroElevators twitter App
    elevatorApp = ElevatorApp(LIVE=LIVE)
    elevatorApp.start()

    # Run HotCar twitter app
    hotCarApplication = HotCarApp(LIVE=LIVE)
    hotCarApplication.start()

    # Run the web page generator
    webPageGenerator = WebPageGenerator()
    webPageGenerator.start()

    # Run forever
    while True:
        gevent.sleep(10)
Exemple #2
0
def run(LIVE=False):

   # Do not run as live unless this module is main
   if __name__ != "__main__":
       LIVE=False

   # Run the web server
   serverApp = Server()
   serverApp.start()

   # Run MetroEscalators twitter App
   escalatorApp = EscalatorApp(LIVE=LIVE)
   escalatorApp.start()

   # Run MetroElevators twitter App
   elevatorApp = ElevatorApp(LIVE=LIVE)
   elevatorApp.start()

   # Run HotCar twitter app
   hotCarApplication = HotCarApp(LIVE=LIVE)
   hotCarApplication.start()

   # Run the web page generator
   webPageGenerator = WebPageGenerator()
   webPageGenerator.start()

   # Run forever
   while True:
       gevent.sleep(10)
"""
Run an instance of the WebPageGenerator restartingGreenlet
for local testing.
"""

import test.setup
from dcmetrometrics.web.WebPageGenerator import WebPageGenerator
print 'Running the webPageGenerator locally'
app = WebPageGenerator()
app.start()
app.join()