4adaa09d75
Optional second destination so each heartbeat and event is posted to a mirror server (the office NAS) alongside the primary — dual-write to de-risk the migration. Default off (blank mirror URLs); existing installs unchanged. - event_forwarder: mirror_reachable() fast-fail probe + mirror_forward_pass() (reliable event mirror with its OWN state file, total exception isolation, never raises into the primary path). - series3_watcher: MIRROR_API_URL/MIRROR_SFM_URL/MIRROR_SFM_STATE_FILE config; best-effort heartbeat mirror; isolated event-mirror pass after the primary. - settings dialog + config-template: new 'Mirror' tab / keys. - 8 new tests incl. the isolation invariant. 44 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
86 lines
3.3 KiB
INI
86 lines
3.3 KiB
INI
[agent]
|
||
|
||
# --- API Heartbeat Settings ---
|
||
API_ENABLED = true
|
||
API_URL =
|
||
API_INTERVAL_SECONDS = 300
|
||
SOURCE_ID = #computer that is running agent.
|
||
SOURCE_TYPE = series3_watcher
|
||
|
||
# Paths
|
||
SERIES3_PATH = C:\Blastware 10\Event\autocall home
|
||
MAX_EVENT_AGE_DAYS = 365
|
||
|
||
|
||
# Scanning
|
||
SCAN_INTERVAL_SECONDS = 30
|
||
|
||
# Logging
|
||
ENABLE_LOGGING = True
|
||
LOG_FILE = C:\Users\%USERNAME%\AppData\Local\Series3Watcher\agent_logs\series3_watcher.log
|
||
LOG_RETENTION_DAYS = 30
|
||
|
||
# .MLG parsing
|
||
MLG_HEADER_BYTES = 2048 ; used for unit-id extraction
|
||
|
||
# Deep sniff
|
||
DEEP_SNIFF = True ; toggle deep sniff on/off
|
||
SNIFF_BYTES = 65536 ; max bytes to scan for Notes/Cal
|
||
|
||
# Auto-updater source: gitea (default) or url
|
||
UPDATE_SOURCE = gitea
|
||
# If UPDATE_SOURCE = url, set UPDATE_URL to the base URL of the update server (e.g. terra-view)
|
||
UPDATE_URL =
|
||
|
||
# --- SFM Event Forwarder ---
|
||
# When enabled, every Blastware event binary (and its paired .TXT
|
||
# report when present) is forwarded to an SFM server's
|
||
# /db/import/blastware_file endpoint as a multipart POST. The SFM
|
||
# server parses the .TXT and indexes the event's full per-channel
|
||
# stats (PPV, ZC Freq, Time of Peak, Peak Acceleration, Peak
|
||
# Displacement, sensor self-check) for sortable / filterable review.
|
||
#
|
||
# Default-off so existing deployments don't change behaviour after an
|
||
# auto-update. To enable on a field machine: set SFM_URL, then flip
|
||
# SFM_FORWARD_ENABLED to true and restart the watcher.
|
||
SFM_FORWARD_ENABLED = false
|
||
SFM_URL = ; e.g. http://10.0.0.44:8200
|
||
SFM_FORWARD_INTERVAL_SECONDS = 60 ; scan-and-forward cadence (independent of heartbeat)
|
||
|
||
# Files modified within the last N seconds are skipped (BW may still
|
||
# be writing them). Defence against truncated uploads.
|
||
SFM_QUIESCENCE_SECONDS = 5
|
||
|
||
# If a binary's .TXT report hasn't appeared after this many seconds,
|
||
# forward the binary alone rather than blocking forever waiting.
|
||
SFM_MISSING_REPORT_GRACE_SECONDS = 60
|
||
|
||
# Per-request HTTP timeout (seconds).
|
||
SFM_HTTP_TIMEOUT = 60
|
||
|
||
# Path to the JSON state file tracking which events have been
|
||
# forwarded (sha256-keyed, idempotent across restarts). Leave blank
|
||
# to default to <log dir>/sfm_forwarded.json.
|
||
SFM_STATE_FILE =
|
||
|
||
# Per-pass cap — forward at most N events per scan tick. 0 = unlimited.
|
||
# Default 500 throttles first-deploy backfill on machines with large
|
||
# historical archives (tens or hundreds of thousands of events) so
|
||
# the SFM server isn't hammered with one giant burst. At 60s scan
|
||
# interval × 500 events/pass that's 30K events/hour throughput.
|
||
# See README "First-time deployment" for the recommended
|
||
# `--seed-state` workflow that skips the historical backfill entirely.
|
||
SFM_MAX_FORWARDS_PER_PASS = 500
|
||
|
||
# --- Mirror (dual-send) ---
|
||
# Optional best-effort second destination: post each heartbeat and event
|
||
# to a mirror server (e.g. the office NAS) IN ADDITION to the primary
|
||
# above. Default off (blank URLs). The mirror can never delay or fail
|
||
# the primary; the event mirror keeps its own state file so nothing is
|
||
# lost while it's down. See docs/mirror-dual-send-design.md.
|
||
MIRROR_API_URL = ; base URL e.g. http://10.0.0.x:8001 (blank = off)
|
||
MIRROR_SFM_URL = ; base URL e.g. http://10.0.0.x:8200 (blank = off)
|
||
# Blank → defaults to <log dir>/sfm_forwarded_mirror.json
|
||
MIRROR_SFM_STATE_FILE =
|
||
|