refactor: use Depends for settings and session_local (#59)

This commit is contained in:
Felix Spöttel
2024-01-01 14:28:19 +01:00
committed by GitHub
parent 557de5a442
commit 3559aa5936
20 changed files with 207 additions and 122 deletions

View File

@@ -7,8 +7,8 @@ from app.shared.celery import get_celery_binding
class TaskQueue:
celery: Celery
def __init__(self) -> None:
self.celery = get_celery_binding()
def __init__(self, broker_url: str) -> None:
self.celery = get_celery_binding(broker_url=broker_url)
def queue_task(self, job: models.Job):
"""