aboutsummaryrefslogtreecommitdiffstats
path: root/servo/management/commands/scheduler.py
diff options
context:
space:
mode:
Diffstat (limited to 'servo/management/commands/scheduler.py')
-rw-r--r--servo/management/commands/scheduler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/servo/management/commands/scheduler.py b/servo/management/commands/scheduler.py
index c400b7b..c9e3839 100644
--- a/servo/management/commands/scheduler.py
+++ b/servo/management/commands/scheduler.py
@@ -1,10 +1,10 @@
from datetime import datetime
import django
+import django_rq
from django.core.management.base import BaseCommand
from django_rq.management.commands import rqscheduler
-import django_rq
django.setup() # To avoid django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
@@ -19,6 +19,7 @@ class Command(rqscheduler.Command):
help = "Start task scheduler"
def handle(self, *args, **kwargs):
+ # reset all tasks on registration
for job in scheduler.get_jobs():
job.delete()