Move SqliteBGTaskHuey earlier in the file

This commit is contained in:
tcely 2025-06-02 07:18:36 -04:00 committed by GitHub
parent d4cffc298a
commit a95b201f0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,6 +126,11 @@ class BGTaskHuey(Huey):
def get_task_wrapper_class(self):
return CompatibleTaskWrapper
class SqliteBGTaskHuey(BGTaskHuey):
storage_class = SqliteStorage
def background(name=None, schedule=None, queue=None, remove_existing_tasks=False, **kwargs):
from django.conf import settings
from django_huey import db_task, db_periodic_task, get_queue
@ -200,10 +205,6 @@ def background(name=None, schedule=None, queue=None, remove_existing_tasks=False
return _periodic_decorator if repeats else _decorator
class SqliteBGTaskHuey(BGTaskHuey):
storage_class = SqliteStorage
def original_background(*args, **kwargs):
from background_task.tasks import tasks
return tasks.background(*args, **kwargs)