Persist static attribute writes to local SQLite at site clusters

Static attribute SetAttribute calls now persist the override to local SQLite,
surviving restart and failover. On Instance Actor startup, persisted overrides
are loaded on top of the deployed configuration. Redeployment resets all
persisted overrides to the new deployed values.
This commit is contained in:
Joseph Doherty
2026-03-16 09:16:29 -04:00
parent 409cc62309
commit 3a833f5dea
2 changed files with 3 additions and 3 deletions

View File

@@ -218,7 +218,7 @@ Scripts have an optional **minimum time between runs** setting. If a trigger fir
### 4.4 Script Capabilities
Scripts executing on a site for a given instance can:
- **Read** attribute values on that instance (live data points and static config).
- **Write** attribute values on that instance. For attributes with a data source reference, the write goes to the Data Connection Layer which writes to the physical device; the in-memory value updates when the device confirms the new value via the existing subscription. For static attributes, the write updates the in-memory value directly.
- **Write** attribute values on that instance. For attributes with a data source reference, the write goes to the Data Connection Layer which writes to the physical device; the in-memory value updates when the device confirms the new value via the existing subscription. For static attributes, the write updates the in-memory value and **persists the override to local SQLite** — the value survives restart and failover. Persisted overrides are reset when the instance is redeployed.
- **Call other scripts** on that instance via `Instance.CallScript("scriptName", params)`. Calls use the Akka ask pattern and return the called script's return value. Script-to-script calls support concurrent execution.
- **Call shared scripts** via `Scripts.CallShared("scriptName", params)`. Shared scripts execute **inline** in the calling Script Actor's context — they are compiled code libraries, not separate actors.
- **Call external system API methods** in two modes: `ExternalSystem.Call()` for synchronous request/response, or `ExternalSystem.CachedCall()` for fire-and-forget with store-and-forward on transient failure (see Section 5).