From 788016cf022ebce98d73934e9a95dfbe9c792f81 Mon Sep 17 00:00:00 2001 From: kshitijrajsharma Date: Mon, 1 Jan 2024 17:11:40 +0545 Subject: [PATCH] Enhances flower config --- API/api_worker.py | 6 +++--- README.md | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/API/api_worker.py b/API/api_worker.py index 2a1a343f..458a0d79 100644 --- a/API/api_worker.py +++ b/API/api_worker.py @@ -30,9 +30,9 @@ celery = Celery("Raw Data API") celery.conf.broker_url = celery_broker_uri celery.conf.result_backend = celery_backend -celery.conf.task_serializer = "pickle" -celery.conf.result_serializer = "pickle" -celery.conf.accept_content = ["application/json", "application/x-python-serialize"] +# celery.conf.task_serializer = "json" +# celery.conf.result_serializer = "json" +# celery.conf.accept_content = ["application/json", "application/x-python-serialize"] celery.conf.task_track_started = True celery.conf.update(result_extended=True) diff --git a/README.md b/README.md index f3179f43..2f7b6cb8 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,12 @@ Raw Data API uses flower for monitoring the Celery distributed queue. Run this c celery --broker=redis://redis:6379// --app API.api_worker flower --port=5000 --queues="raw_special,raw_default" ``` +OR Simply use flower from application itself + +```bash +celery --broker=redis://localhost:6379// flower +``` + ### Navigate to the docs to view Raw Data API endpoints After sucessfully starting the server, visit [http://127.0.0.1:8000/v1/docs](http://127.0.0.1:8000/v1/docs) on your browser to view the API docs.