summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2015-07-08 14:41:25 +0300
committerYuval Adam <yuval@y3xz.com>2015-07-08 14:41:50 +0300
commit58482f5220373b0cf6c7af745624fcf7ae91318a (patch)
treec9e2dca7c670a3a2cd531c7bceaa8873ff33c6a1
parent169c078ca02dcf779a9b220378e78cbbd6c2a257 (diff)
Cleanup logging
-rw-r--r--modes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modes.py b/modes.py
index 9ee6a2f..f53d3f5 100644
--- a/modes.py
+++ b/modes.py
@@ -83,6 +83,7 @@ def process_jobs(jobs):
if r.get(jobkey):
continue
else:
+ print('{} :: Got job {}'.format(datetime.now().isoformat(), job['data']))
ModesPrinter(job['data']).process_image()
r.set(jobkey, '1', 60 * 5)
@@ -90,7 +91,6 @@ def loop():
while True:
try:
res = requests.get(ROOT_URL)
- print('{} :: {}'.format(datetime.now().isoformat(), res.content))
process_jobs(res.json())
except Exception as e:
print('{} :: {}'.format(datetime.now().isoformat(), e))
@@ -102,4 +102,5 @@ if __name__ == '__main__':
test = 'yuv.adm|062015|9A8D6D736489|eff51f2af82c06071120a'
ModesPrinter(test).test_image()
else:
+ print('{} :: Startup'.format(datetime.now().isoformat())
loop()