diff options
Diffstat (limited to 'python/globeop.py')
| -rw-r--r-- | python/globeop.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/python/globeop.py b/python/globeop.py deleted file mode 100644 index a5afbe3e..00000000 --- a/python/globeop.py +++ /dev/null @@ -1,27 +0,0 @@ -import logging -import argparse -import datetime -from task_server.globeop import download_data, upload_data -from sqlalchemy import create_engine - -logging.basicConfig(filename='/home/share/CorpCDOs/logs/globeop.log', - level=logging.INFO, - format='%(asctime)s %(message)s') - -parser = argparse.ArgumentParser() -group = parser.add_mutually_exclusive_group(required=True) -## options are technically not exclusive, but we will be running them -## at different times of the day -group.add_argument("-d", "--download", action="store_true", - help="download reports from GlobeOp") -group.add_argument("-u", "--upload", action="store_true", - help="upload marks to GlobeOp") -parser.add_argument("date", nargs='?', type=lambda s: datetime.datetime.strptime(s, "%Y-%m-%d"), - default=datetime.datetime.today()) -args = parser.parse_args() - -if args.download: - download_data(args.date.date()) -elif args.upload: - engine = create_engine('postgresql://dawn_user@debian/dawndb') - upload_data(engine, args.date) |
