Commit 53dcda80 by Edward Zarecor

Merge pull request #34 from edx/e0d/update-all-requirements

refactoring use of deprecated scheduler
parents 84d40127 c3e8861c
.idea/
*.pyc
*.swp
notifier.db
......
from apscheduler.scheduler import Scheduler
from apscheduler.schedulers.blocking import BlockingScheduler
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from notifier.tasks import do_forums_digests
# N.B. standalone=True means that sched.start() will block until forcibly stopped.
sched = Scheduler(standalone=True)
# As it's name implies, when started, this Scheduler will block until forcibly stopped.
sched = BlockingScheduler(standalone=True)
@sched.cron_schedule(**settings.DIGEST_CRON_SCHEDULE)
def digest_job():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment