mirror of
https://github.com/urbit/shrub.git
synced 2024-11-29 14:57:12 +03:00
removes auto-resetting "init" sync
This commit is contained in:
parent
cb7f6b8968
commit
99a3fc6a05
@ -167,7 +167,6 @@
|
||||
++ poke-helm-tlon-add-stream (wrap poke-tlon-add-stream):from-helm
|
||||
++ poke-helm-tlon-init-stream (wrap poke-tlon-init-stream):from-helm
|
||||
++ poke-hood-sync (wrap poke-sync):from-kiln
|
||||
++ poke-hood-init-sync (wrap poke-init-sync):from-kiln
|
||||
++ poke-kiln-commit (wrap poke-commit):from-kiln
|
||||
++ poke-kiln-info (wrap poke-info):from-kiln
|
||||
++ poke-kiln-label (wrap poke-label):from-kiln
|
||||
|
@ -130,7 +130,7 @@
|
||||
|= hos/kiln-sync
|
||||
?: (~(has by syn) hos)
|
||||
abet:(spam (render "already syncing" [sud her syd]:hos) ~)
|
||||
abet:abet:(start-sync:(auto hos) |)
|
||||
abet:abet:start-sync:(auto hos)
|
||||
::
|
||||
++ poke-syncs :: print sync config
|
||||
|= ~
|
||||
@ -140,12 +140,6 @@
|
||||
%+ turn ~(tap in ~(key by syn))
|
||||
|=(a/kiln-sync (render "sync configured" [sud her syd]:a))
|
||||
::
|
||||
++ poke-init-sync
|
||||
|= hos/kiln-sync
|
||||
?: (~(has by syn) hos)
|
||||
abet:(spam (render "already syncing" [sud her syd]:hos) ~)
|
||||
abet:abet:(start-sync:(auto hos) &)
|
||||
::
|
||||
++ poke-unsync ::
|
||||
|= hus/kiln-unsync
|
||||
?. (~(has by syn) hus)
|
||||
@ -231,9 +225,7 @@
|
||||
++ subscribe-next
|
||||
%- emit
|
||||
^- card
|
||||
:* %warp /kiln/autoload [our our] %home ~
|
||||
%next %z da+now /sys
|
||||
==
|
||||
[%warp /kiln/autoload [our our] %home `[%next %z da+now /sys]]
|
||||
::
|
||||
++ writ =>(check-new subscribe-next)
|
||||
++ check-new
|
||||
@ -326,7 +318,7 @@
|
||||
her=(slav %p i.t.way)
|
||||
sud=(slav %tas i.t.t.way)
|
||||
==
|
||||
abet:abet:(mere:(auto hos) .?(t.t.t.way) mes)
|
||||
abet:abet:(mere:(auto hos) mes)
|
||||
::
|
||||
++ take-writ-sync ::
|
||||
|= {way/wire rot/riot}
|
||||
@ -336,7 +328,7 @@
|
||||
her=(slav %p i.t.way)
|
||||
sud=(slav %tas i.t.t.way)
|
||||
==
|
||||
abet:abet:(writ:(auto hos) .?(t.t.t.way) rot)
|
||||
abet:abet:(writ:(auto hos) rot)
|
||||
::
|
||||
++ take-writ-autoload
|
||||
|= {way/wire rot/riot}
|
||||
@ -377,6 +369,7 @@
|
||||
/kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
[our her] sud ~
|
||||
==
|
||||
:: XX duplicate of start-sync? see |track
|
||||
::
|
||||
++ start-track
|
||||
=> (spam (render "activated track" sud her syd) ~)
|
||||
@ -388,33 +381,25 @@
|
||||
== ==
|
||||
::
|
||||
++ start-sync
|
||||
|= reset/?
|
||||
=. +>.$ (spam (render "activated sync" sud her syd) ~)
|
||||
%- blab
|
||||
:~ :* ost %warp
|
||||
[%kiln %sync syd (scot %p her) sud ?:(reset /reset /)]
|
||||
[our her] sud ~ %sing %w [%da now] /
|
||||
== ==
|
||||
=< (spam (render "activated sync" sud her syd) ~)
|
||||
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
(blab [ost %warp wire [our her] sud `[%sing %w [%da now] /]] ~)
|
||||
::
|
||||
++ writ
|
||||
|= {reset/? rot/riot}
|
||||
|= rot=riot
|
||||
?~ rot
|
||||
%^ spam
|
||||
leaf+"bad %writ response"
|
||||
(render "on sync" sud her syd)
|
||||
~
|
||||
=. let ?. ?=($w p.p.u.rot) let ud:((hard cass:clay) q.q.r.u.rot)
|
||||
%- blab ^- (list move) :_ ~
|
||||
:* ost %merg
|
||||
[%kiln %sync syd (scot %p her) sud ?:(reset /reset /)]
|
||||
our syd her sud ud+let
|
||||
?: =(0 ud:.^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now)))
|
||||
%init
|
||||
%mate
|
||||
==
|
||||
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
=/ =cass .^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now))
|
||||
=/ =germ ?:(=(0 ud.cass) %init %mate)
|
||||
(blab [ost %merg wire our syd her sud ud+let germ] ~)
|
||||
::
|
||||
++ mere
|
||||
|= {reset/? mes/(each (set path) (pair term tang))}
|
||||
|= mes=(each (set path) (pair term tang))
|
||||
=. let +(let)
|
||||
=. +>.$
|
||||
%- spam
|
||||
@ -434,14 +419,8 @@
|
||||
leaf+"note: blank desk {<sud>} on {<her>}"
|
||||
==
|
||||
==
|
||||
=. +>.$
|
||||
?. reset +>.$
|
||||
(blab [ost %poke /init-reset [our %hood] %helm-reset ~]~)
|
||||
%- blab :_ ~
|
||||
:* ost %warp
|
||||
/kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
[our her] sud ~ %sing %y ud+let /
|
||||
==
|
||||
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
||||
(blab [ost %warp wire [our her] sud `[%sing %y ud+let /]] ~)
|
||||
--
|
||||
::
|
||||
++ work :: state machine
|
||||
|
@ -305,13 +305,12 @@
|
||||
=. tem ~
|
||||
=. moz :_(moz [hen %pass / %c %merg our %home our %base da+now %init])
|
||||
=. moz :_(moz [hen %pass ~ %g %conf [[our ram] %load our %home]])
|
||||
=. +> (sync %home our %base)
|
||||
=. +> ?: ?=(?($czar $pawn) can) +>
|
||||
(sync %base (sein our) %kids)
|
||||
=. +> ?: ?=(?($czar $pawn) can)
|
||||
(sync %home our %base)
|
||||
(init-sync %home our %base)
|
||||
=. +> ?. ?=(?($duke $king $czar) can) +>
|
||||
:: make kids desk publicly readable, so syncs work.
|
||||
::
|
||||
(show %kids):(sync %kids our %base)
|
||||
=. +> autoload
|
||||
=. +> peer
|
||||
@ -368,16 +367,6 @@
|
||||
==
|
||||
==
|
||||
::
|
||||
++ init-sync
|
||||
|= syn/{desk ship desk}
|
||||
%_ +>.$
|
||||
moz
|
||||
:_ moz
|
||||
:* hen %pass /init-sync %g %deal [our our]
|
||||
ram %poke %hood-init-sync -:!>(syn) syn
|
||||
==
|
||||
==
|
||||
::
|
||||
++ autoload
|
||||
%_ .
|
||||
moz
|
||||
|
Loading…
Reference in New Issue
Block a user