Watch the world folder: auto spawn/upgrade, broker watch/unwatch, retire scan
ci / check (push) Failing after 7m36s
ci / check (push) Failing after 7m36s
The host watches the whole world folder recursively with the notify crate
(any writer counts, .sausage-tmp-* skipped, ~100 ms coalescing per path).
A new or changed actor/<id>/actor.wasm (or new folder actor/<id>) is
booted as at start once quiet: new = spawn (tested first), changed =
upgrade. The broker `scan` request is gone; the boot pass stays, plus a
full pass when the OS watcher overflows.
New broker requests watch/unwatch {path} (saved in actor.json `watches`)
deliver fs_changed {path, op: write|create|remove|rename, to?} from `fs`,
not routed, dropped when the mailbox is full; overflow sends every watcher
one fs_changed {path:"/actor", op:"rescan"}.
Card #91 (multi-host step 1).
This commit is contained in:
@@ -72,8 +72,9 @@ versions/<n>/ every installed version: actor.wasm, source/, meta.json
|
||||
```
|
||||
|
||||
To add or replace an actor by hand, put an `actor.wasm` (and its `source/`,
|
||||
with the tests in `source/tests/`) into its folder. Then restart the world or
|
||||
send `@broker {"type":"scan"}`. The broker tests the file before it uses it.
|
||||
with the tests in `source/tests/`) into its folder; the host watches the
|
||||
world folder and picks the file up once it stops changing. The broker tests
|
||||
the file before it uses it.
|
||||
If the tests fail, the old version keeps running, and `stderr.log` says why.
|
||||
|
||||
## More
|
||||
|
||||
Reference in New Issue
Block a user