touch expiring set
This block is part of the realtime group and was last modified in core v15.0.2.
touch expiring set v15.0.2 Adds a member to an expiring set for ttl_ms, or renews it: staff on shift while their heartbeats keep arriving, a job claimed while its worker reports progress.
- flow
- set
valuerequired - member
valueDefaults to the user of the run's socket.
- ttl ms
numberrequired - data
objectStored with the member; members and the trigger return it.
- flow
- success
condition - joined
condition - error
value
Sets the member's TTL to ttl_ms from now, adding it when absent; joined is true only on the call that added it, so work that should happen once per stay (a notice that someone started) goes behind joined, however often the touches come. When the TTL lapses with no socket holding the member, it leaves and trigger_liveset_change runs with reason "expired"; a touch before then runs nothing. member defaults to the run's socket's user. data replaces the stored object when set. The expiry rides on durable timers, so it fires even if the node that touched it is gone. success=false with error TTL_REQUIRED, NO_MEMBER or LIVESET_NOT_ENABLED.
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