diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-03 13:46:47 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-12-03 13:46:47 +0100 |
| commit | a2863d22795c0ab626aa2e494694ff640c94b718 (patch) | |
| tree | 8fc9c72aca0a705e86452f9f5770b3ba90a47a2f /client/notifier.py | |
| parent | bb0880be651d2478e8eab013a61eff8384f6e002 (diff) | |
| parent | 39b7e23a8079cd40d71d9bef0371bf20c5156f4b (diff) | |
| download | jasper-client-a2863d22795c0ab626aa2e494694ff640c94b718.tar.gz jasper-client-a2863d22795c0ab626aa2e494694ff640c94b718.zip | |
Merge pull request #257 from Holzhaus/apscheduler-bump-to-v3
Migrate from APScheduler 2.1.2 to 3.0.1
Diffstat (limited to 'client/notifier.py')
| -rw-r--r-- | client/notifier.py | 6 |
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): |
