-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOP-20962] import original celery & modify it for tests
- Loading branch information
Ilyas Gasanov
committed
Nov 6, 2024
1 parent
3947c5b
commit 532a065
Showing
1 changed file
with
2 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,3 @@ | ||
from celery import Celery | ||
from syncmaster.worker.config import celery | ||
|
||
from syncmaster.settings import Settings | ||
from syncmaster.worker.base import WorkerTask | ||
|
||
# TODO: remove settings object creating during import | ||
settings = Settings() | ||
|
||
celery = Celery( | ||
__name__, | ||
broker=settings.broker.url, | ||
backend="db+" + settings.database.sync_url, | ||
task_cls=WorkerTask, | ||
imports=[ | ||
"syncmaster.worker.transfer", | ||
"tests.test_integration.test_scheduler.test_task", | ||
], | ||
) | ||
celery.conf.update(imports=list(celery.conf.imports) + ["tests.test_integration.test_scheduler.test_task"]) |