# Path: dcmetrometrics/common/restartingGreenlet.py
# class RestartingGreenlet(Greenlet):
# 
#     def __init__(self, *args, **kwargs):
#         Greenlet.__init__(self)
# 
#         # Save the constructer arguments
#         # so we can recreate the Greenlet
#         self.rsargs = args
#         self.rskwargs = kwargs
# 
#         # Set up this Greenlet to use the restarter
#         self.link(self.restart)
# 
#     @staticmethod
#     def restart(g):
#         newg = makeNewGreenlet(g)
#         newg.start()
# 
# Path: dcmetrometrics/common/dbGlobals.py
# class _DBGlobals(object):
#     def __init__(self):
#     def update(self):
#     def getEscalatorIds(self):
#     def getElevatorIds(self):
#     def getUnitIds(self):
#     def getDB(self):
# def getDB():
# def connect():
# def G():
# _G = None # Global object
#     _G = _DBGlobals()
# 
# Path: dcmetrometrics/hotcars/hotCars.py
# DEBUG = logger.debug
# ME = 'MetroHotCars'.upper()
#         WUNDERGROUND_API_KEY = None
#     T = getTwitterAPI()
#     T = getTwitterAPI()
#     T = getTwitterAPI()
#     T = getTwitterAPI() 
# def hasForbiddenWord(t):
# def getHotCarUrl(carNum):
# def getWundergroundAPI():
# def tick(tweetLive = False):
#     def tweetMentionsMe(tweet):
#     def filterSelfRetweets(t):
# def makeUTCDateTime(secSinceEpoch):
# def updateDBFromTweet(tweet, hotCarData):
# def filterDuplicateReports(tweetData):
#     def doc_to_data(doc):
# def genResponseTweet(handle, hotCarData):
# def getForbiddenCarsByMention():
#     def isAutomatedTweet(tweet):
#     def getTimeCarPairs(tweet):
# def getMentions(curTime):
#     def tweetIsForbidden(tweet):
# def countWeekdays(t1, t2):
# def summarizeReports(db, reports):


    import test.setup
import gevent
import os
import sys
import logging
                import traceback
from datetime import datetime
from dcmetrometrics.common.restartingGreenlet import RestartingGreenlet
from dcmetrometrics.common import dbGlobals
from dcmetrometrics.hotcars import hotCars
from dcmetrometrics.common.globals import DATA_DIR, REPO_DIR, DATA_DIR
    from time import sleep

# TEST CODE
if __name__ == "__main__":



OUTPUT_DIR = DATA_DIR

###############################################################
# Log the HotCarApp App to a file.

LOG_FILE_NAME = os.path.join(DATA_DIR, 'HotCarApp.log')
fh = logging.FileHandler(LOG_FILE_NAME)
sh = logging.StreamHandler(sys.stderr)

formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)
sh.setFormatter(formatter)

logger = logging.getLogger('HotCarApp')
logger.addHandler(fh)
logger.addHandler(sh)
#################################################################

class HotCarApp(RestartingGreenlet):

    def __init__(self, LIVE=False):

        dbGlobals.connect()


# Path: dcmetrometrics/common/restartingGreenlet.py
# class RestartingGreenlet(Greenlet):
# 
#     def __init__(self, *args, **kwargs):
#         Greenlet.__init__(self)
# 
#         # Save the constructer arguments
#         # so we can recreate the Greenlet
#         self.rsargs = args
#         self.rskwargs = kwargs
# 
#         # Set up this Greenlet to use the restarter
#         self.link(self.restart)
# 
#     @staticmethod
#     def restart(g):
#         newg = makeNewGreenlet(g)
#         newg.start()
# 
# Path: dcmetrometrics/common/dbGlobals.py
# class _DBGlobals(object):
#     def __init__(self):
#     def update(self):
#     def getEscalatorIds(self):
#     def getElevatorIds(self):
#     def getUnitIds(self):
#     def getDB(self):
# def getDB():
# def connect():
# def G():
# _G = None # Global object
#     _G = _DBGlobals()
# 
# Path: dcmetrometrics/hotcars/hotCars.py
# DEBUG = logger.debug
# ME = 'MetroHotCars'.upper()
#         WUNDERGROUND_API_KEY = None
#     T = getTwitterAPI()
#     T = getTwitterAPI()
#     T = getTwitterAPI()
#     T = getTwitterAPI() 
# def hasForbiddenWord(t):
# def getHotCarUrl(carNum):
# def getWundergroundAPI():
# def tick(tweetLive = False):
#     def tweetMentionsMe(tweet):
#     def filterSelfRetweets(t):
# def makeUTCDateTime(secSinceEpoch):
# def updateDBFromTweet(tweet, hotCarData):
# def filterDuplicateReports(tweetData):
#     def doc_to_data(doc):
# def genResponseTweet(handle, hotCarData):
# def getForbiddenCarsByMention():
#     def isAutomatedTweet(tweet):
#     def getTimeCarPairs(tweet):
# def getMentions(curTime):
#     def tweetIsForbidden(tweet):
# def countWeekdays(t1, t2):
# def summarizeReports(db, reports):


# Path: hotCarApp.py
    import test.setup
import gevent
import os
import sys
import logging
                import traceback
from datetime import datetime
from dcmetrometrics.common.restartingGreenlet import RestartingGreenlet
from dcmetrometrics.common import dbGlobals
from dcmetrometrics.hotcars import hotCars
from dcmetrometrics.common.globals import DATA_DIR, REPO_DIR, DATA_DIR
    from time import sleep


# TEST CODE
if __name__ == "__main__":



OUTPUT_DIR = DATA_DIR

###############################################################
# Log the HotCarApp App to a file.

LOG_FILE_NAME = os.path.join(DATA_DIR, 'HotCarApp.log')
fh = logging.FileHandler(LOG_FILE_NAME)
sh = logging.StreamHandler(sys.stderr)

formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)
sh.setFormatter(formatter)

logger = logging.getLogger('HotCarApp')
logger.addHandler(fh)
logger.addHandler(sh)
#################################################################

class HotCarApp(RestartingGreenlet):

    def __init__(self, LIVE=False):

        dbGlobals.connect()


        RestartingGreenlet.__init__(self, LIVE=LIVE)