changeset 3:acb378b62dfd

--now feature for testing Ignore-this: 6bdde93e896c4f4b8bbe7df4e2d3f42e
author drewp@bigasterisk.com
date Thu, 16 Jan 2020 23:34:11 -0800
parents 30f9d65ceba1
children fb02ad302f2f
files gcalendarwatch tasks.py
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gcalendarwatch	Thu Jan 16 23:33:36 2020 -0800
+++ b/gcalendarwatch	Thu Jan 16 23:34:11 2020 -0800
@@ -347,6 +347,7 @@
 
 Options:
   -v, --verbose  more logging
+  --now          don't wait for first update
 ''')
 
     verboseLogging(args['--verbose'])
@@ -365,6 +366,8 @@
         datetime.datetime.now() + datetime.timedelta(days=60)))
 
     poller = Poller(sync, conf['minutes_between_polls'] * 60)
+    if args['--now']:
+        poller.updateNow()
 
     class Application(cyclone.web.Application):
         def __init__(self):
--- a/tasks.py	Thu Jan 16 23:33:36 2020 -0800
+++ b/tasks.py	Thu Jan 16 23:34:11 2020 -0800
@@ -18,7 +18,7 @@
 
 @task(pre=[build_image])
 def local_run(ctx):
-    ctx.run(f'docker run --name {JOB}_local --rm -it --net=host {TAG} python3 gcalendarwatch -v', pty=True)
+    ctx.run(f'docker run --name {JOB}_local --rm -it --net=host {TAG} python3 gcalendarwatch -v --now', pty=True)
 
 @task(pre=[push_image])
 def redeploy(ctx):