diff --git a/apps/mosquito/tasks.py b/apps/mosquito/tasks.py index 11dded8..90a3bf1 100644 --- a/apps/mosquito/tasks.py +++ b/apps/mosquito/tasks.py @@ -76,6 +76,7 @@ def update_daily_statistic(): history, created = MosqPostStatistic.objects.update_or_create(date=d, total=ret[d], increment=increment) is_first = False + @task() def update_latest_statistic(): pass \ No newline at end of file diff --git a/mosqkiller/settings.py b/mosqkiller/settings.py index 2c173c6..68885f3 100644 --- a/mosqkiller/settings.py +++ b/mosqkiller/settings.py @@ -201,7 +201,7 @@ CACHES = { } # Celery settings -CELERY_BROKER_URL = 'redis://127.0.0.1:6379/2' +CELERY_BROKER_URL = 'redis://:IySpkVL39NeOgyC@127.0.0.1:6379/2' CELERY_RESULT_BACKEND = 'django-db' CELERY_ACCEPT_CONTENT = ['json'] CELERY_TASK_SERIALIZER = 'json'