MCPcopy
hub / github.com/celery/celery / hello

Function hello

celery/worker/control.py:377–391  ·  view source on GitHub ↗

Request mingle sync-data.

(state, from_node, revoked=None, **kwargs)

Source from the content-addressed store, hash-verified

375
376@inspect_command(visible=False)
377def hello(state, from_node, revoked=None, **kwargs):
378 """Request mingle sync-data."""
379 # pylint: disable=redefined-outer-name
380 # XXX Note that this redefines `revoked`:
381 # Outside of this scope that is a function.
382 if from_node != state.hostname:
383 logger.info('sync with %s', from_node)
384 if revoked:
385 worker_state.revoked.update(revoked)
386 # Do not send expired items to the other worker.
387 worker_state.revoked.purge()
388 return {
389 'revoked': worker_state.revoked._data,
390 'clock': state.app.clock.forward(),
391 }
392
393
394@inspect_command(default_timeout=0.2)

Callers

nothing calls this directly

Calls 3

infoMethod · 0.45
updateMethod · 0.45
purgeMethod · 0.45

Tested by

no test coverage detected