815c643fb2
Two safety nets for first-deploy on Blastware ACH machines that
have accumulated tens or hundreds of thousands of historical events
in the watch folder.
1. SFM_MAX_FORWARDS_PER_PASS (default 500, 0=unlimited)
---------------------------------------------------
Cap on the number of events forwarded per scan tick. At the
60-second default interval that's ~30K events/hour throughput —
the SFM server gets a steady drip instead of one giant burst.
Scan now sorts by mtime ascending so backfill advances
chronologically (oldest first) and successive scans always
make progress instead of re-considering the same N newest files.
Wired into:
- event_forwarder.find_pending_events / forward_pending
- series3_watcher.run_watcher loop
- config-template.ini
- settings_dialog SFM Forward tab (new "Max Events Per Pass"
spinbox, validated in _on_save)
2. event_forwarder.py --seed-state CLI
-----------------------------------
One-shot mode that walks the watch folder, sha256s every in-window
event binary, and marks them all as already-forwarded WITHOUT
POSTing anything. Run before flipping SFM_FORWARD_ENABLED=true
to skip the historical backfill entirely — the watcher then only
forwards events that appear AFTER the seed.
Usage:
python event_forwarder.py --seed-state \
--watch "C:\Blastware 10\Event\autocall home" \
--state "C:\...\sfm_forwarded.json" \
[--max-age-days 365]
7 new unit tests:
- max_per_pass cap enforcement (=N, =0 unlimited, oldest-first
ordering)
- seed-state mode (in-window seeding, max-age skip,
end-to-end skip-after-seed, idempotent re-runs)
README adds a "First-time deployment" section walking through both
options. Bumps to v1.5.2.
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
; Inno Setup script for Series 3 Watcher
|
|
; Run through Inno Setup Compiler after building dist\series3-watcher.exe
|
|
|
|
[Setup]
|
|
AppName=Series 3 Watcher
|
|
AppVersion=1.5.2
|
|
AppPublisher=Terra-Mechanics Inc.
|
|
DefaultDirName={pf}\Series3Watcher
|
|
DefaultGroupName=Series 3 Watcher
|
|
OutputBaseFilename=series3-watcher-setup
|
|
Compression=lzma
|
|
SolidCompression=yes
|
|
; Require admin rights so we can write to Program Files
|
|
PrivilegesRequired=admin
|
|
|
|
[Tasks]
|
|
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; Flags: unchecked
|
|
|
|
[Dirs]
|
|
; Create the agent_logs folder so the watcher can write logs on first run
|
|
Name: "{app}\agent_logs"
|
|
|
|
[Files]
|
|
; Main executable — built by build.bat / PyInstaller
|
|
Source: "dist\series3-watcher.exe"; DestDir: "{app}"; Flags: ignoreversion
|
|
|
|
[Icons]
|
|
; Start Menu shortcut
|
|
Name: "{group}\Series 3 Watcher"; Filename: "{app}\series3-watcher.exe"
|
|
; Start Menu uninstall shortcut
|
|
Name: "{group}\Uninstall Series 3 Watcher"; Filename: "{uninstallexe}"
|
|
; Desktop shortcut (optional — controlled by [Tasks] above)
|
|
Name: "{commondesktop}\Series 3 Watcher"; Filename: "{app}\series3-watcher.exe"; Tasks: desktopicon
|
|
; Startup folder shortcut so the tray app launches on login
|
|
Name: "{userstartup}\Series 3 Watcher"; Filename: "{app}\series3-watcher.exe"
|
|
|
|
[Run]
|
|
; Offer to launch the app after install (unchecked by default)
|
|
Filename: "{app}\series3-watcher.exe"; \
|
|
Description: "Launch Series 3 Watcher"; \
|
|
Flags: nowait postinstall skipifsilent unchecked
|