summaryrefslogtreecommitdiff
path: root/client/notifier.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-12-02 22:28:27 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2014-12-02 22:28:27 +0100
commit39b7e23a8079cd40d71d9bef0371bf20c5156f4b (patch)
tree8fc9c72aca0a705e86452f9f5770b3ba90a47a2f /client/notifier.py
parentbb0880be651d2478e8eab013a61eff8384f6e002 (diff)
downloadjasper-client-39b7e23a8079cd40d71d9bef0371bf20c5156f4b.tar.gz
jasper-client-39b7e23a8079cd40d71d9bef0371bf20c5156f4b.zip
Migrate from APScheduler 2.1.2 to 3.0.1
Diffstat (limited to 'client/notifier.py')
-rw-r--r--client/notifier.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/notifier.py b/client/notifier.py
index 941ae6b..a896784 100644
--- a/client/notifier.py
+++ b/client/notifier.py
@@ -2,7 +2,7 @@
import Queue
import atexit
from modules import Gmail
-from apscheduler.scheduler import Scheduler
+from apscheduler.schedulers.background import BackgroundScheduler
import logging
@@ -30,9 +30,9 @@ class Notifier(object):
self._logger.warning('gmail_address or gmail_password not set ' +
'in profile, Gmail notifier will not be used')
- sched = Scheduler(daemon=True)
+ sched = BackgroundScheduler(timezone="UTC", daemon=True)
sched.start()
- sched.add_interval_job(self.gather, seconds=30)
+ sched.add_job(self.gather, 'interval', seconds=30)
atexit.register(lambda: sched.shutdown(wait=False))
def gather(self):