Skip to content
Snippets Groups Projects
Commit 8b524aed authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

black-format some celery code

WIP on #174 and #175
parent d596f367
No related branches found
No related tags found
No related merge requests found
Pipeline #21693 failed
...@@ -4,4 +4,4 @@ from __future__ import absolute_import, unicode_literals ...@@ -4,4 +4,4 @@ from __future__ import absolute_import, unicode_literals
# Django starts so that shared_task will use this app. # Django starts so that shared_task will use this app.
from .celery import app as celery_app from .celery import app as celery_app
__all__ = ('celery_app',) __all__ = ("celery_app",)
\ No newline at end of file
...@@ -3,15 +3,15 @@ import os ...@@ -3,15 +3,15 @@ import os
from celery import Celery from celery import Celery
# set the default Django settings module for the 'celery' program. # set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ippisite.settings') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ippisite.settings")
app = Celery('ippidb') app = Celery("ippidb")
# Using a string here means the worker doesn't have to serialize # Using a string here means the worker doesn't have to serialize
# the configuration object to child processes. # the configuration object to child processes.
# - namespace='CELERY' means all celery-related configuration keys # - namespace='CELERY' means all celery-related configuration keys
# should have a `CELERY_` prefix. # should have a `CELERY_` prefix.
app.config_from_object('django.conf:settings', namespace='CELERY') app.config_from_object("django.conf:settings", namespace="CELERY")
# Load task modules from all registered Django app configs. # Load task modules from all registered Django app configs.
app.autodiscover_tasks() app.autodiscover_tasks()
...@@ -19,4 +19,4 @@ app.autodiscover_tasks() ...@@ -19,4 +19,4 @@ app.autodiscover_tasks()
@app.task(bind=True) @app.task(bind=True)
def debug_task(self): def debug_task(self):
print('Request: {0!r}'.format(self.request)) print("Request: {0!r}".format(self.request))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment