MCPcopy
hub / github.com/celery/celery / flaky

Method flaky

t/unit/backends/test_asynchronous.py:464–471  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

462 state = {'n': 0}
463
464 def flaky(*args, **kwargs):
465 state['n'] += 1
466 if state['n'] == 1:
467 raise OSError('simulated broker restart')
468 # Yield to hub so the promise thread can run.
469 self.result_consumer_drain_events(
470 timeout=kwargs.get('timeout', None),
471 )
472
473 with patch.object(
474 self.drainer.result_consumer, 'drain_events',

Callers 3

conftest.pyFile · 0.45
test_inspect.pyFile · 0.45
test_tasks.pyFile · 0.45

Calls 2

getMethod · 0.45

Tested by

no test coverage detected