Skip to content
Snippets Groups Projects
Commit 0369c43b authored by Hartung, Michael's avatar Hartung, Michael
Browse files

linting

Former-commit-id: 84c054cc23d31ce93d35240f2e8802c41b6c7288 [formerly fc7df1df8b9c8c79c4100d8445a62f7005d377c4]
Former-commit-id: a3fe5d04dc036bb7b9e73eb5119184d82b465879
parent e013c733
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@ import os
from celery import Celery
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drugstone.settings")
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'drugstone.settings')
app = Celery("drugstone")
app.config_from_object("django.conf:settings", namespace="CELERY")
app = Celery('drugstone')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()
from celery.schedules import crontab
CELERY_BEAT_SCHEDULE = {
"update_db": {
"task": "drugstone.tasks.task_update_db_from_nedrex",
"schedule": crontab(minute="*/1000"),
'update_db': {
'task': 'drugstone.tasks.task_update_db_from_nedrex',
'schedule': crontab(minute='*/1000'),
},
}
......@@ -166,6 +166,6 @@ CACHES = {
}
}
CELERY_BROKER_URL = os.environ.get("CELERY_BROKER_URL")
CELERY_BROKER_URL = os.environ.get('CELERY_BROKER_URL')
# timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
CELERY_TIMEZONE = 'Europe/Berlin'
......@@ -7,12 +7,12 @@ logger = get_task_logger(__name__)
@shared_task
def task_update_db_from_nedrex():
logger.info("Updating DB from NeDRex.")
logger.info('Updating DB from NeDRex.')
print('here')
logger.info("Fetching data...")
logger.info('Fetching data...')
fetch_nedrex_data()
logger.info("Integrating data...")
logger.info('Integrating data...')
integrate_nedrex_data()
logger.info("Done.")
logger.info('Done.')
[pycodestyle]
exclude = */migrations/*,venv,test_*,manage.py,tasks/*,*/commands/*
exclude = */migrations/*,.env,venv,test_*,manage.py,tasks/*,*/commands/*
max-line-length = 120
[flake8]
exclude = */migrations/*,venv,test_*,manage.py,tasks/*,*/commands/*
exclude = */migrations/*,.env,venv,test_*,manage.py,tasks/*,*/commands/*,*/__init__.py,*/settings.py
max-line-length = 120
inline-quotes = '
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