Commit 4cc34265 by Edward Zarecor

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

refactoring for new scheduler
parents 53dcda80 58159155
......@@ -7,7 +7,7 @@ from notifier.tasks import do_forums_digests
# 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():
do_forums_digests.delay()
......@@ -26,4 +26,5 @@ class Command(BaseCommand):
"""
def handle(self, *args, **options):
sched.add_job(digest_job, 'cron', **settings.DIGEST_CRON_SCHEDULE)
sched.start()
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