From: Tony Mack Date: Sun, 6 Oct 2013 00:02:41 +0000 (-0400) Subject: fix check_schedule X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c61cab0c174ecf319497cac923541a3c44a45d06;p=plstackapi.git fix check_schedule --- diff --git a/planetstack/observer/event_loop.py b/planetstack/observer/event_loop.py index 482c5a8..f67e2eb 100644 --- a/planetstack/observer/event_loop.py +++ b/planetstack/observer/event_loop.py @@ -176,7 +176,7 @@ class PlanetStackObserver: self.last_run_times[step.__name__]=time.time() def check_schedule(self, step): - time_since_last_run = time.time() - self.last_run_times[step.__name__] + time_since_last_run = time.time() - self.last_run_times.get(step.__name__, 0) try: if (time_since_last_run < step.requested_interval): raise StepNotReady