Skip to content

Commit

Permalink
add *args and *kwargs to route for task function
Browse files Browse the repository at this point in the history
add pylint exception
  • Loading branch information
melvinsoft committed Jun 17, 2021
1 parent 5a105a8 commit 5155d9e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions figures/settings/lms_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5155d9e

Please sign in to comment.