Open eastebry opened 9 years ago
For existing rules, this probably only need to save the contents of the event windows, ie self.occurences and self.cur/ref_window.
I think a good way to do this is have a global option to save state at a given time interval, overridable per rule.
RuleTypes should have an optional method for serializing their state data.
The current state of each rule is currently stored in memory, which it loses whenever it restarts.
It would be nice to allow the rules to write state to elastic search or to disk so it can gracefully resume whenever it restarts.