I realized that already-ran actions where not run on startup.
This is a problem because reaction is expected to ban, then unban.
On startup it runs already ran action with have a still-to-be run action
with an after directive.
So the solution to this problem has been to move the action execution
logic to the filter manager, which have a coherent view of all the
action set of a filter.
I also changed how pending actions are run on exit:
- Before, pending tasks would be left out by the runtime quitting, and
now tasks would run to exec them
- Now, pending tasks are woken up by a global CancellationToken.
This token also replace the shutdown channel.
The daemon/mod.rs then waits for all the tasks to complete via an
empty mpsc channel.
TODO
Add the (Match, Time) to triggers only if longuest_action_duration is
non-zero.
Then spawn a task that will remove past self.triggers (Match, Time) after
longuest_action_duration time.
reaction's configuration now has a state_directory optional member,
which is where it will save its databases. defaults to cwd.
added a lot of code necessary to properly test databases.
The new tests are currently failing, which is good : they'll permit
to hunt down this database consistency bug.
also removed some indirect dependencies via features removal,
and moved test dependencies to dedicated [dev-dependencies]
also small fix on an nft46.c function type and empty conf file
for ccls LSP server.