on expiring set change

This block is part of the realtime group and was last modified in core v15.0.2.

on expiring set change v15.0.2

Runs when a member joins or leaves an expiring set whose name starts with the prefix in event: a device coming online in devices:, a member of staff whose shift heartbeats stopped in shifts:. Once per change, across the cluster.

Out pins 1
  • On Change execute_function

Starter, written in the .blueprint flow form: `flow changed = trigger_liveset_change with {event: "devices:"} on function -> fn`. event is a prefix of set names; an entity may declare several, and a change runs only the one with the longest prefix of the set's name ("devices:" and "devices:site-1:" both match devices:site-1:door; the second runs). An empty event matches every set. The function gets set, member, change ("joined" or "left"), reason (joined: "added"; left: "released" when its last socket hold went and the linger ran out, "node_lost" when that socket's node died, "expired" when its TTL lapsed, "removed" by liveset_remove) and data (the object stored with the member). Each change is decided in one Redis call, so it runs once for the whole cluster, never on a heartbeat or a renewal: a member re-held inside its linger, or touched before its TTL lapses, runs nothing. Typical uses: devices or kiosks online per site, staff on shift, workers in a pool, people in a room.

on liveset change
expiring set trigger

Version history

Introduced in v15.0.2.

  • v15.0.2: block added in this release.

Back to realtime Return to the main group to view all sub-groups Back to expiring sets Return to the group to view all blocks within this group