Closed lunkwill42 closed 8 hours ago
eventid_file: Not quite sure what this is, it should be checked
eventid_file
is just there to tell zino1 what the last used eventid is.
This is a state it belongs to the persist_file
instead in zino2.
As of this i do not think its needed in zino2
as checked in zino1 production with the last created eventid 178449 as checked with curitz client
--> $ cat eventid
178449
The original zino1 code does not use a consistent naming scheme. In the reimplementation try to be more consistent on this.
Also please add a descriptive example config file lots of comments with default values for each option
Zino 1 features a config file for some generic settings (whereas the current Zino 2 beta hardcodes everything that isn't configurable through a command line option).
The original configuration file is (of course) plain Tcl, and looks something like this:
While some of these options aren't relevant for Zino 2 (because of features that have intentionally been dropped), several of them should be supported in a Zino 2 config file.
There is no reason to keep the original format (as Zino 2 is not written in Tcl): The config file is small and should be easy to port by hand. In keeping with some of our other recent projects, I would suggest a TOML configuration file (
zino.toml
). Existing Zino 2 features (at the time of this writing) that should be configurable would be:persist_file
, a.ka.a the file where persistent state is saved (defaults tozino-state.json
atm).persist_period
, how often the state should be saved (I assume when not otherwise rescheduled by Zino because of critical state changes)eventid_file
: Not quite sure what this is, it should be checkedold_events
: The directory where expired events are savedpollfile
: The path to a validpolldevs.cf
. This is currently configurable with a command line option in Zino 2. At best, order of precedence here should be 1. command line option, 2. config file, 3. default value (./polldevs.cf
)conf_check
: Presumably how oftenpolldevs.cf
is re-read. Maybe check whetherzino.cf
(and by extension,zino.toml
is re-read on this interval as well)zino_secrets
: The path to the file containing user accounts and secrets for the Zino API. Currently hardcoded in Zino 2 to justsecrets
.Since we're redefining the config file, it's okay to group thing into TOML sections where applicable.