From 5155d9ee05a7d4971c03f7dd60fcedfe38593b84 Mon Sep 17 00:00:00 2001 From: melvinsoft Date: Wed, 16 Jun 2021 20:55:41 -0300 Subject: [PATCH 1/2] add *args and *kwargs to route for task function add pylint exception --- figures/settings/lms_production.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/figures/settings/lms_production.py b/figures/settings/lms_production.py index 5f9217f5..0f53d93b 100644 --- a/figures/settings/lms_production.py +++ b/figures/settings/lms_production.py @@ -6,6 +6,18 @@ from celery.schedules import crontab +class FiguresRouter(object): + + def __init__(self, figures_tasks_queue_name): + self.figures_tasks_queue_name = figures_tasks_queue_name + + def route_for_task(self, task, args=None, kwargs=None): # pylint: disable=unused-argument + if task.startswith("figures.tasks."): + return self.figures_tasks_queue_name + + return None + + def update_webpack_loader(webpack_loader_settings, figures_env_tokens): """ Update the WEBPACK_LOADER in the settings. From 8a4e17cfa7ad5ad8e58754641314d4aec9da4dca Mon Sep 17 00:00:00 2001 From: melvinsoft Date: Wed, 16 Jun 2021 21:22:48 -0300 Subject: [PATCH 2/2] remove blank line --- figures/settings/lms_production.py | 1 - 1 file changed, 1 deletion(-) diff --git a/figures/settings/lms_production.py b/figures/settings/lms_production.py index ab56e17d..b85002b0 100644 --- a/figures/settings/lms_production.py +++ b/figures/settings/lms_production.py @@ -11,7 +11,6 @@ class FiguresRouter(object): def __init__(self, figures_tasks_queue_name): self.figures_tasks_queue_name = figures_tasks_queue_name - def route_for_task(self, task, args=None, kwargs=None): # pylint: disable=unused-argument if task.startswith("figures.tasks."): return self.figures_tasks_queue_name