Request mingle sync-data.
(state, from_node, revoked=None, **kwargs)
| 402 | |
| 403 | @inspect_command(visible=False) |
| 404 | def hello(state, from_node, revoked=None, **kwargs): |
| 405 | """Request mingle sync-data.""" |
| 406 | # pylint: disable=redefined-outer-name |
| 407 | # XXX Note that this redefines `revoked`: |
| 408 | # Outside of this scope that is a function. |
| 409 | if from_node != state.hostname: |
| 410 | logger.info('sync with %s', from_node) |
| 411 | if revoked: |
| 412 | worker_state.merge_revoked(revoked) |
| 413 | # Do not send expired items to the other worker. |
| 414 | worker_state.revoked.purge() |
| 415 | return { |
| 416 | # The ids only, see merge_revoked(): oldest first, so that |
| 417 | # a receiver whose set is full evicts our oldest ids first. |
| 418 | 'revoked': list(worker_state.revoked), |
| 419 | 'clock': state.app.clock.forward(), |
| 420 | } |
| 421 | |
| 422 | |
| 423 | @inspect_command(default_timeout=0.2) |