Commit graph

10 commits

Author SHA1 Message Date
ppom
daf1bf3818
Update configuration
- 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
2025-05-31 12:00:00 +02:00
Baptiste Careil
cf96fa30f1
Add test directory for reading configuration files from a directory 2025-05-28 12:00:00 +02:00
ppom
859e35e5c3 Speed up tests now that we handle millisecond precision
Previously database cropped to the second precision
Now it keeps millisecond precision and handle millisecond units
2025-02-26 12:00:00 +01:00
ppom
82ab861132 Fix and enhance tests
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.
2025-02-16 12:00:00 +01:00
Baptiste Careil
672f0e9599 Add test config to test delayed actions 2024-12-29 10:20:20 +01:00
Baptiste Careil
68637e35a7 Fix #110: don't show error message on shutdown
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.
2024-11-19 14:54:53 +00:00
Baptiste Careil
a3081b0486 Fix #111: Streams now read stderr from started processes 2024-11-11 16:54:35 +01:00
ppom
79677cf327 Restructure code and document it in ARCHITECTURE.md 2024-10-26 12:00:00 +02:00
ppom
40fc6e3380 Fix client-daemon protocol & client output 2024-10-24 12:00:00 +02:00
ppom
3dd97523fd Move new rust codebase to root dir 2024-10-24 12:00:00 +02:00