From 13a1203cd7cde28a6bce0690235b820eb6458ee5 Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Thu, 21 Jan 2021 23:08:19 +0100
Subject: [PATCH] ### 0.0.10 Release * Issue #24 update_data * Issue #26
 /admin/database/dump * Issue #28 /admin/database/import * Issue #29 /who/info
 * Issue #30 /europa/info * Issue #31 /rki/info * Issue #32 /nrw/info * Issue
 #33 /europe/date_reported * Issue #34 /europe/continent * Issue #35
 /europe/country * Issue #36 /europe/data * Issue #37 switch from RabbitMQ to
 Redis * Issue #38 update Celery from 4 to 5

---
 config.py          | 10 ++++------
 server_mq.py       |  2 ++
 setup.cfg          |  3 ++-
 start_server_mq.sh |  4 ++--
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/config.py b/config.py
index 211dd63e..a9e62b08 100644
--- a/config.py
+++ b/config.py
@@ -3,11 +3,9 @@ POSTGRES_PW = 'covid19datapwd'
 POSTGRES_URL = 'localhost'
 POSTGRES_DB = 'covid19data'
 ITEMS_PER_PAGE = 20
-YOUR_NAME = 'covid19python'
-PASSWORD = 'vfdjv423ndf654&%%'
-VHOST_NAME = 'covid19python'
+#YOUR_NAME = 'covid19python'
+#PASSWORD = 'vfdjv423ndf654&%%'
+#VHOST_NAME = 'covid19python'
 CELERY_BROKER_URL = 'redis://localhost:6379/0'
 #CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
-#RESULT_BACKEND = 'redis://localhost:6379/0'
-#RESULT_BACKEND = True
-SECRET_KEY='vfdjv423ndf654&%%'
\ No newline at end of file
+SECRET_KEY='vfdjv423ndf654&%%'
diff --git a/server_mq.py b/server_mq.py
index af9c5ab3..4a66eb36 100644
--- a/server_mq.py
+++ b/server_mq.py
@@ -10,6 +10,8 @@ celery = Celery(app.name, broker=app.config['CELERY_BROKER_URL'])
 celery.conf.update(app.config)
 celery.conf.result_backend = app.config['CELERY_BROKER_URL']
 celery.conf.broker_transport_options = {'visibility_timeout': 18000, 'max_retries': 5}
+celery.conf.worker_send_task_events = True
+celery.conf.task_send_sent_event = True
 
 
 @celery.task(bind=True)
diff --git a/setup.cfg b/setup.cfg
index 0edab5af..19bc05f6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,3 +1,4 @@
+[metadata]
 name = covid19python
 version = 0.0.10
 
@@ -5,4 +6,4 @@ version = 0.0.10
 packages = covid19python
 install_requires =
   requests
-  importlib; python_version == "3.8"
\ No newline at end of file
+  importlib; python_version == "3.8"
diff --git a/start_server_mq.sh b/start_server_mq.sh
index 1b0be063..c19fabe0 100644
--- a/start_server_mq.sh
+++ b/start_server_mq.sh
@@ -3,7 +3,7 @@
 python server_mq.py
 
 # celery 4
-#celery -A server_mq.celery --loglevel=info worker
+celery -A server_mq.celery --loglevel=info worker
 
 # celery 5
-celery -A server_mq.celery worker
+#celery -A server_mq.celery worker
-- 
GitLab