@contextmanager
def start_worker(app, concurrency=1, pool=u'solo', loglevel=WORKER_LOGLEVEL, logfile=None, perform_ping_check=True, ping_task_timeout=10.0, **kwargs):
 test_worker_starting.send(sender=app)
 with _start_worker_thread(app, concurrency=concurrency, pool=pool, loglevel=loglevel, logfile=logfile, **kwargs) as worker:
  if perform_ping_check:
   from .tasks import ping
   with allow_join_result():
    assert (ping.delay().get(timeout=ping_task_timeout) == u'pong')
  (yield worker)
 test_worker_stopped.send(sender=app, worker=worker)

@ contextmanager def start_worker ( app , concurrency = 1 , pool = u'solo' , loglevel = WORKER_LOGLEVEL , logfile = None , perform_ping_check = True , ping_task_timeout = 10.0 , ** kwargs ) : test_worker_starting . send ( sender = app ) with _start_worker_thread ( app , concurrency = concurrency , pool = pool , loglevel = loglevel , logfile = logfile , ** kwargs ) as worker : if perform_ping_check : from . tasks import ping with allow_join_result ( ) : assert ( ping . delay ( ) . get ( timeout = ping_task_timeout ) == u'pong' ) ( yield worker ) test_worker_stopped . send ( sender = app , worker = worker )
start embedded worker .