NUWCDIVNPT / stigman-watcher

A utility that watches a path for test result files on behalf of a STIG Manager Collection
Other
6 stars 4 forks source link

Modify alarm handling #121

Closed cd-rite closed 3 months ago

cd-rite commented 3 months ago

~~Currently, scheduled scans are cancelled on alarmRaised, and new scan starts immediately upon alarmLowered. Scan should only be scheduled if work queues are empty.~~ (OBE - PR: #128 )

Possible behavior On alarm raised: Pause batch queue processing (pause itself on apiOffline alarm raised, resume on lower) pause parse queue (currently pauses on alarm in event mode, not scan mode) cancel any scheduled scan, note if scan was cancelled (and the time for which was scheduled)

on alarm lowered: resume batch queue processing resume parse queue processing if no scan was scheduled, then run scan immediately on default cadence. schedule scan for same time previously if one was cancelled on alarm raised, or run immediately if past that time. if queues are empty, schedule scan