-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3e40b6
commit 663c052
Showing
5 changed files
with
23 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,3 +1,7 @@ | ||
from dandi.celery import app as celery_app | ||
# This project module is imported for us when Django starts. To ensure that Celery app is always | ||
# defined prior to any shared_task definitions (so those tasks will bind to the app), import | ||
# the Celery module here for side effects. | ||
from .celery import app as _celery_app # noqa: F401 | ||
|
||
__all__ = ('celery_app',) | ||
# Do not import anything else from this file, to avoid interfering with the startup order of the | ||
# Celery app and Django's settings. |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import os | ||
|
||
import configurations.importer | ||
from django.core.asgi import get_asgi_application | ||
|
||
|
||
os.environ['DJANGO_SETTINGS_MODULE'] = 'dandi.settings' | ||
if not os.environ.get('DJANGO_CONFIGURATION'): | ||
raise ValueError('The environment variable "DJANGO_CONFIGURATION" must be set.') | ||
configurations.importer.install() | ||
|
||
application = get_asgi_application() |
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
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
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