Skip to content

Instantly share code, notes, and snippets.

@churnikov
Created May 26, 2021 12:47
Show Gist options
  • Save churnikov/b3044706fe6d629d1081499deaa4a99d to your computer and use it in GitHub Desktop.
Save churnikov/b3044706fe6d629d1081499deaa4a99d to your computer and use it in GitHub Desktop.
Как можно переопределить метод start_task
class OneQPriority(OneQ):
def __init__(self, config, priority=None):
self.priority = priority
super().__init__(config)
def start_task(self, **kwargs):
kwargs["priority"] = kwargs.get("priority", self.priority)
super().start_task(**kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment