예제 #1
0
파일: tasks.py 프로젝트: anukat2015/udata
    def wrapper(func):
        t = task(func)

        def call_task(badge, **kwargs):
            t.delay(badge, **kwargs)

        signal.connect(call_task, weak=False)
        return t
예제 #2
0
    def wrapper(func):
        t = task(func)

        def call_task(issue, **kwargs):
            t.delay(issue, **kwargs)

        signal.connect(call_task, weak=False)
        return t
예제 #3
0
    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