sintonia/python_apps/airtime_analyzer/bin/airtime_analyzer
Albert Santoni 59535850e2 CC-5709: Airtime Analyzer Queue
* Added StatusReporter class to make HTTP requests back to Airtime
* Handle even more errors now
* Added proper logging and log rotation
* Added --debug flag for increased logging.
2014-03-05 22:43:47 -05:00

22 lines
577 B
Python
Executable file

#!/usr/bin/env python
import daemon
import argparse
import airtime_analyzer as aa
VERSION = "1.0"
print "Airtime Analyzer " + VERSION
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--daemon", help="run as a daemon", action="store_true")
parser.add_argument("--debug", help="log full debugging output", action="store_true")
args = parser.parse_args()
if args.daemon:
with daemon.DaemonContext():
analyzer = aa.AirtimeAnalyzerServer(debug=args.debug)
else:
# Run without daemonizing
analyzer = aa.AirtimeAnalyzerServer(debug=args.debug)