groups: refactor ota

This commit is contained in:
Liam Fitzgerald 2020-07-08 23:52:41 +00:00
parent 5848d819f8
commit 64065d720c
4 changed files with 15 additions and 7 deletions

View File

@ -98,11 +98,13 @@
[crds old]
=/ [pax=path =ship]
i.syncs
?> ?=(^ pax)
?. =('~' i.pax)
$(syncs t.syncs)
=/ new-path=path
t.pax
=. synced.old
(~(del by synced.old) pax)
=/ new-path=path
?> ?=(^ pax)
?:(=('~' i.pax) t.pax pax)
?. =(ship our.bol)
=. synced.old
(~(put by synced.old) new-path ship)

View File

@ -50,11 +50,15 @@
%0
:_ this(state *state-one)
|^
%+ turn
%+ murn
~(tap by synced.old)
|= [=path host=ship]
^- card
^- (unit card)
?> ?=([@ @ *] path)
:: ignore duplicate publish groups
?: =(4 (lent path))
~& "ignoring: {<path>}"
~
=/ pax=^path
?: =('~' i.path)
t.path
@ -65,8 +69,8 @@
(slav %p i.pax)
[ship i.t.pax]
?: =(our.bowl host)
(add-push rid)
(add-pull rid host)
`(add-push rid)
`(add-pull rid host)
::
++ poke-our
|= [app=term =cage]

View File

@ -10,6 +10,7 @@
+$ any-state
$% state
[ver=?(%1 %2 %3 %4 %5 %6) lac=(map @tas fin-any-state)]
[%7 drum=state:drum helm=state:helm kiln=state:kiln]
==
+$ any-state-tuple
$: drum=any-state:drum

View File

@ -224,6 +224,7 @@
==
++ add
|= [=ship =resource]
~| resource
?< (~(has by tracking) resource)
=. tracking
(~(put by tracking) resource ship)