Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def filter_callback(callback, tasks):

    def filtered(body, message):
        if tasks and body['task'] not in tasks:
            return

        return callback(body, message)
    return filtered
        


src/c/e/celery-3.1.11/celery/tests/contrib/test_migrate.py   celery(Download)
from kombu.transport.virtual import QoS
 
from celery.contrib.migrate import (
    StopFiltering,
    State,
    def test_filter(self):
        callback = Mock()
        filt = filter_callback(callback, ['add', 'mul'])
        t1 = {'task': 'add'}
        t2 = {'task': 'div'}

src/c/e/celery-HEAD/celery/tests/contrib/test_migrate.py   celery(Download)
from kombu.transport.virtual import QoS
 
from celery.contrib.migrate import (
    StopFiltering,
    State,
    def test_filter(self):
        callback = Mock()
        filt = filter_callback(callback, ['add', 'mul'])
        t1 = {'task': 'add'}
        t2 = {'task': 'div'}