event · events.capacity-policy

Capacity policy changed

Reports one scenario capacity limit only after the policy owner commits it.

events.capacity-policy.changed(policy_id, previous_limit, current_limit, current_usage, revision, origin_id, request_sequence)
Stable ID
events.capacity-policy.changed
Owner
app.scenario-capacity-policy
Authority
read_only
Timing
post_commit
Availability
active-session
Side effects
none
Determinism
ordered after the capacity-policy commit and before command completion
Introduced
1.2.0

Usage

Refresh displayed capacity values after a committed change.

Parameters

Returns

An immutable post-commit event.

Cost

One retained event and callback delivery.

Fields

IDTypeUnitsRequiredDescription
current_limitunsigned-integernoneyesCommitted capacity limit.
current_usageunsigned-integernoneyesObserved owner use when the limit committed.
origin_idstringnoneyesEngine-created caller origin ID.
policy_idstringnoneyesRegistered scenario capacity-policy identity.
previous_limitunsigned-integernoneyesLimit before the committed change.
request_sequenceunsigned-integernoneyesCommand request that produced the change.
revisionrevisionnoneyesScenario capacity-policy revision after the commit.

Errors

Examples

local subscription = events.listen("events.capacity-policy.changed", function(event) print(event.payload.current_limit) end)

API history

Related symbols

Project references