From 4b2d491c2908ec6b677fe494547774bf7d323cb5 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Sun, 6 Jun 2021 16:21:28 +0300 Subject: Fix django.core.exceptions.AppRegistryNotReady in scheduler --- servo/management/commands/scheduler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'servo/management') diff --git a/servo/management/commands/scheduler.py b/servo/management/commands/scheduler.py index 18018e5..c400b7b 100644 --- a/servo/management/commands/scheduler.py +++ b/servo/management/commands/scheduler.py @@ -1,9 +1,12 @@ from datetime import datetime -import django_rq +import django + 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. from servo.tasks import check_mail -- cgit v1.2.3