MCPcopy
hub / github.com/celery/celery / sync

Method sync

celery/worker/consumer/mingle.py:39–49  ·  view source on GitHub ↗
(self, c)

Source from the content-addressed store, hash-verified

37 self.sync(c)
38
39 def sync(self, c):
40 info('mingle: searching for neighbors')
41 replies = self.send_hello(c)
42 if replies:
43 info('mingle: sync with %s nodes',
44 len([reply for reply, value in replies.items() if value]))
45 [self.on_node_reply(c, nodename, reply)
46 for nodename, reply in replies.items() if reply]
47 info('mingle: sync complete')
48 else:
49 info('mingle: all alone')
50
51 def send_hello(self, c):
52 inspect = c.app.control.inspect(timeout=1.0, connection=c.connection)

Callers 1

startMethod · 0.95

Calls 4

send_helloMethod · 0.95
on_node_replyMethod · 0.95
infoFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected