- Remove PersistData utility
- Provide plugins a state directory instead, by starting them inside.
- Store the secret key as a file inside this directory.
- Use iroh's crate for base64 encoding, thus removing one dependency.
- Implement plugin's stream_impl and action_impl functions,
creating all necessary data structures.
- Fixed concurrency to 1 not to be platform dependent
- Added fields introduced by recent changes
- Used builtin str comparator that produces a diff instead of the eq
predicate
We were scheduling the action with exec_now, but it spawns a new task
itself, which did not have the ShutdownToken.
Persistance part of the start_stop test doesn't work
because when the after actions are executed, they decrement the trigger,
which is then removed from DB.
So they should not decrement it anymore, just check that it's still
there. Next commit!
- README.md: update minimal example (was outdated since a long time 🤐)
- README.md: link to Security part of the wiki
- README.md: fix OpenBSD broken link
- README.md: add `state_directory` option
- activitywatch & server configs: remove from config directory. only
available in the wiki.
- heavy-load: move to new bench directory
- test: move to tests directory
Fix#121
The tokio task that removes the trigger after the last after-action was
not woken up & cancelled by the cancellation token, but left to die when
tokio quits.
Unfortunately this broke the tests, where tokio is kept from one
reaction launch to another. Those tasks kept a reference to the DB, then
preventing it to close, then preventing a new DB instance from being
opened.
This was difficult to debug due to the tests only checking that reaction
quits with an error, but not testing what kind of error it is.
So they now check that reaction quits with the "normal" error, which is
that all streams finished.
The tokio task is now woken up, like the other sleeping tasks, at
shutdown, and quits doing nothing.
It's not very satisfying because I assume it's a bit costly to wake up a
task, so I'm gonna see how I can improve this.
I may start a new tokio runtime for each subtest.
I may delete this task and move its instructions to the last
after-action.
I may do both.
The stream_manager is now the sole owner of the child process handle and
is responsible for cleaning it.
The stream_manager expects a shutdown command from the broadcast channel
it receives as parameter and watches it concurrently with the child process
I/O.
When the shutdown command is received, the child process is killed and the
remaining I/O is processed. Then the child process is reaped. Or it is
killed and reaped after EOF is encountered, would the child process exit
before (or at the same time as) the shutdown command is issued.