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 move_task_by_id(task_id, dest, **kwargs):
    """Find a task by id and move it to another queue.

    :param task_id: Id of task to move.
    :param dest: Destination queue.

    Also supports the same keyword arguments as :func:`move`.

    """
    return move_by_idmap({task_id: dest}, **kwargs)
        


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_move_task_by_id(self):
        with patch('celery.contrib.migrate.move') as move:
            move_task_by_id('123f', Queue('foo'))
            self.assertTrue(move.called)
            cb = move.call_args[0][0]

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_move_task_by_id(self):
        with patch('celery.contrib.migrate.move') as move:
            move_task_by_id('123f', Queue('foo'))
            self.assertTrue(move.called)
            cb = move.call_args[0][0]