mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 05:50:31 +08:00
radicle: introduce announcer
Similar to the `Fetcher` sans-IO approach, an `Announcer` sans-IO approach is introduced. The previous `Handler::announce` was already quite close to using a sans-IO approach, but using internally held state. This change makes the business logic more reusable – and testable. Similarly to the `Fetcher`, the `Announcer` is configured and then driven by telling it when nodes have been synchronized with. It will continuously check if it has reached its target, yielding to the caller to decide whether to keep going. In contrast, it also provides a way to mark the process as timed out, since announcing relies on waiting for events to come back in a timely manner.
This commit is contained in:
committed by
Lorenz Leutgeb
parent
fa9c6cd142
commit
5b4cbc2cd8
@@ -59,7 +59,7 @@ f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/heads/master
|
||||
|
||||
```
|
||||
$ rad sync --announce
|
||||
✓ Synced with 1 node(s)
|
||||
✓ Synced with 1 seed(s)
|
||||
```
|
||||
|
||||
Note that it is forbidden to delete the default/canonical branch:
|
||||
|
||||
Reference in New Issue
Block a user