def wrapper(func): t = task(func) def call_task(badge, **kwargs): t.delay(badge, **kwargs) signal.connect(call_task, weak=False) return t
def wrapper(func): t = task(func) def call_task(issue, **kwargs): t.delay(issue, **kwargs) signal.connect(call_task, weak=False) return t
def wrapper(func): t = task(func) def call_task(sender, **kwargs): if isinstance(sender, cls) and kwargs.get('kind') == kind: t.delay(str(sender.pk)) on_badge_added.connect(call_task, weak=False) return t