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
- policy_id: changed identity.
- previous_limit: prior value.
- current_limit: committed value.
- current_usage: observed use.
- revision: new revision.
- origin_id: caller identity.
- request_sequence: command sequence.
Returns
An immutable post-commit event.
Cost
One retained event and callback delivery.
Fields
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
current_limit | unsigned-integer | none | yes | Committed capacity limit. |
current_usage | unsigned-integer | none | yes | Observed owner use when the limit committed. |
origin_id | string | none | yes | Engine-created caller origin ID. |
policy_id | string | none | yes | Registered scenario capacity-policy identity. |
previous_limit | unsigned-integer | none | yes | Limit before the committed change. |
request_sequence | unsigned-integer | none | yes | Command request that produced the change. |
revision | revision | none | yes | Scenario capacity-policy revision after the commit. |
Errors
- None
Examples
local subscription = events.listen("events.capacity-policy.changed", function(event) print(event.payload.current_limit) end)
API history
- 1.2.0: Capacity-policy event added.