child-sync, breach-sync, breach-multiple works

This commit is contained in:
Philip Monk 2019-05-22 17:01:02 -07:00
parent 5ec205a34a
commit 4f739caeab
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
3 changed files with 37 additions and 19 deletions

View File

@ -123,7 +123,7 @@
++ poke-track :: ++ poke-track ::
|= hos/kiln-sync |= hos/kiln-sync
?: (~(has by syn) hos) ?: (~(has by syn) hos)
abet:(spam (render "already syncing" [sud her syd]:hos) ~) abet:(spam (render "already tracking" [sud her syd]:hos) ~)
abet:abet:start-track:(auto hos) abet:abet:start-track:(auto hos)
:: ::
++ poke-sync :: ++ poke-sync ::

View File

@ -286,7 +286,7 @@
:: ::
++ cach (unit (unit (each cage lobe))) :: cached result ++ cach (unit (unit (each cage lobe))) :: cached result
+$ wove [for=(unit ship) =rove] :: stored source + req +$ wove [for=(unit ship) =rove] :: stored source + req
++ rove :: stored request ++ rove :: stored request $% [%sing =mood] :: single request
$% [%sing =mood] :: single request $% [%sing =mood] :: single request
[%next =mood aeon=(unit aeon) =cach] :: next version of one [%next =mood aeon=(unit aeon) =cach] :: next version of one
$: %mult :: next version of any $: %mult :: next version of any
@ -2696,13 +2696,13 @@
:: ::
++ bait ++ bait
|= {hen/duct tym/@da} |= {hen/duct tym/@da}
(emit hen %pass /tyme %b %wait tym) (emit hen %pass /tyme/(scot %p her)/[syd] %b %wait tym)
:: ::
:: Cancel timer. :: Cancel timer.
:: ::
++ best ++ best
|= {hen/duct tym/@da} |= {hen/duct tym/@da}
(emit hen %pass /tyme %b %rest tym) (emit hen %pass /tyme/(scot %p her)/[syd] %b %rest tym)
:: ::
:: Give subscription result. :: Give subscription result.
:: ::
@ -3332,10 +3332,11 @@
%mult ~ %mult ~
%many %many
%^ hunt lth %^ hunt lth
?. ?=(%da -.from.moat.rov) ~ ?. ?=(%da -.from.moat.rov) ~
?.((lth now p.from.moat.rov) ~ [~ p.from.moat.rov]) ?. (lth now p.from.moat.rov) ~
[~ p.from.moat.rov]
?. ?=(%da -.to.moat.rov) ~ ?. ?=(%da -.to.moat.rov) ~
(hunt gth [~ now] [~ p.to.moat.rov]) `(max now p.to.moat.rov)
== ==
fun fun
+>.$ +>.$
@ -3375,12 +3376,13 @@
== ==
$(sub-results t.sub-results) $(sub-results t.sub-results)
:: ::
:: Loop through open subscriptions and check if we can fill any of them. :: Loop through open subscriptions and check if we can fill any of
:: them.
:: ::
++ wake ++ wake
^+ . ^+ .
=/ old-subs=(list [=wove ducts=(set duct)]) ~(tap by qyx) =/ old-subs=(list [=wove ducts=(set duct)]) ~(tap by qyx)
=| new-subs=_old-subs =| new-subs=(list [=wove ducts=(set duct)])
|- ^+ ..wake |- ^+ ..wake
?~ old-subs ?~ old-subs
:: install new subs :: install new subs
@ -3389,7 +3391,7 @@
?: =(~ ducts.i.old-subs) ?: =(~ ducts.i.old-subs)
:: drop forgotten roves :: drop forgotten roves
:: ::
$(old-subs t.old-subs, new-subs new-subs) $(old-subs t.old-subs)
=+ ^- [new-sub=(unit rove) sub-results=(list sub-result)] =+ ^- [new-sub=(unit rove) sub-results=(list sub-result)]
(try-fill-sub wove.i.old-subs) (try-fill-sub wove.i.old-subs)
=. ..wake (send-sub-results sub-results ducts.i.old-subs) =. ..wake (send-sub-results sub-results ducts.i.old-subs)
@ -3408,9 +3410,11 @@
%sing %sing
=/ cache-value=(unit (unit cage)) =/ cache-value=(unit (unit cage))
?~(ref ~ (~(get by haw.u.ref) mood.rov)) ?~(ref ~ (~(get by haw.u.ref) mood.rov))
~& [%fill-sub-sing our her syd (print-wove for rov)]
?^ cache-value ?^ cache-value
:: if we have a result in our cache, produce it :: if we have a result in our cache, produce it
:: ::
~& [%fill-sub-sing-cached]
:- ~ :- ~
?~ u.cache-value ?~ u.cache-value
[%blub ~]~ [%blub ~]~
@ -3419,12 +3423,14 @@
:: ::
=/ aeon=(unit aeon) (case-to-aeon case.mood.rov) =/ aeon=(unit aeon) (case-to-aeon case.mood.rov)
?~ aeon ?~ aeon
~& [%fill-sub-sing-no-aeon]
[`rov ~] [`rov ~]
:: we have the appropriate aeon, so read in the data :: we have the appropriate aeon, so read in the data
:: ::
=/ value=(unit (unit (each cage lobe))) =/ value=(unit (unit (each cage lobe)))
(read-at-aeon:ze for u.aeon mood.rov) (read-at-aeon:ze for u.aeon mood.rov)
?~ value ?~ value
~& [%fill-sub-sing-no-value]
:: We don't have the data directly, which is potentially :: We don't have the data directly, which is potentially
:: problematical. How can we fetch the data? :: problematical. How can we fetch the data?
:: ::
@ -3433,9 +3439,10 @@
[~ ~] [~ ~]
~& [%clay-sing-indirect-data desk=syd mood=mood.rov aeon=u.aeon] ~& [%clay-sing-indirect-data desk=syd mood=mood.rov aeon=u.aeon]
[`rov ~] [`rov ~]
~& [%fill-sub-sing-value]
:: we have the data, so we produce the results :: we have the data, so we produce the results
:: ::
[`rov [%balk u.value mood.rov]~] [~ [%balk u.value mood.rov]~]
:: ::
:: %next is just %mult with one path, so we pretend %next = %mult here. :: %next is just %mult with one path, so we pretend %next = %mult here.
:: ::
@ -3588,13 +3595,16 @@
-- --
:: ::
%many %many
~& [%fill-sub-many our her syd (print-wove for rov)]
=/ from-aeon (case-to-aeon from.moat.rov) =/ from-aeon (case-to-aeon from.moat.rov)
?~ from-aeon ?~ from-aeon
~& [%fill-sub-many-no-from-aeon]
:: haven't entered the relevant range, so do nothing :: haven't entered the relevant range, so do nothing
:: ::
[`rov ~] [`rov ~]
=/ to-aeon (case-to-aeon to.moat.rov) =/ to-aeon (case-to-aeon to.moat.rov)
?~ to-aeon ?~ to-aeon
~& [%fill-sub-many-no-to-aeon u.from-aeon]
:: we're in the middle of the range, so produce what we can, :: we're in the middle of the range, so produce what we can,
:: but don't end the subscription :: but don't end the subscription
:: ::
@ -3606,12 +3616,15 @@
=/ new-lobes=(map path lobe) =/ new-lobes=(map path lobe)
(lobes-at-path:ze for let.dom path.moat.rov) (lobes-at-path:ze for let.dom path.moat.rov)
?: =(lobes.rov new-lobes) ?: =(lobes.rov new-lobes)
~& [%fill-sub-many-no-to-aeon-no-changes]
:: if no changes, don't produce results :: if no changes, don't produce results
:: ::
~ ~
~& [%fill-sub-many-no-to-aeon-changes]
:: else changes, so produce them :: else changes, so produce them
:: ::
[%bleb let.dom ?:(track.rov ~ `[u.from-aeon let.dom])]~ [%bleb let.dom ?:(track.rov ~ `[u.from-aeon let.dom])]~
~& [%fill-sub-many-both-aeons from-aeon to-aeon]
:: we're past the end of the range, so end subscription :: we're past the end of the range, so end subscription
:: ::
:- ~ :- ~
@ -3621,7 +3634,9 @@
:: ::
=/ bleb=(list sub-result) =/ bleb=(list sub-result)
?: =(lobes.rov new-lobes) ?: =(lobes.rov new-lobes)
~& [%fill-sub-many-yes-aeon-no-changes old=lobes.rov new=new-lobes]
~ ~
~& [%fill-sub-many-yes-aeon-yes-changes]
[%bleb +(u.from-aeon) ?:(track.rov ~ `[u.from-aeon u.to-aeon])]~ [%bleb +(u.from-aeon) ?:(track.rov ~ `[u.from-aeon u.to-aeon])]~
:: end subscription :: end subscription
:: ::
@ -3705,7 +3720,8 @@
^- (map path lobe) ^- (map path lobe)
?: =(0 yon) ~ ?: =(0 yon) ~
:: we use %z for the check because it looks at all child paths. :: we use %z for the check because it looks at all child paths.
?: |(?=(~ for) (may-read u.for %z yon pax)) ~ ?. |(?=(~ for) (may-read u.for %z yon pax)) ~& %lobes-at-path-no ~
~& [%lobes-at-path (aeon-to-yaki yon)]
%- malt %- malt
%+ skim %+ skim
%~ tap by %~ tap by
@ -4523,12 +4539,14 @@
?^ error.q.hin ?^ error.q.hin
[[hen %slip %d %flog %crud %wake u.error.q.hin]~ ..^$] [[hen %slip %d %flog %crud %wake u.error.q.hin]~ ..^$]
:: ::
?: ?=([%tyme ~] tea) ?: ?=([%tyme @ @ ~] tea)
~& %out-of-tyme =/ her (slav %p i.t.tea)
`..^$ =/ syd (slav %tas i.t.t.tea)
:: dear reader, if it crashes here, check the wire. If it came ~& [%out-of-tyme our=our her=her `@tas`syd]
:: from ++bait, then I don't think we have any handling for that =^ mos ruf
:: sort of thing. =/ den ((de our now ski hen ruf) her syd)
abet:wake:den
[mos ..^$]
:: ::
=^ queued cue.ruf ~(get to cue.ruf) =^ queued cue.ruf ~(get to cue.ruf)
:: ::

View File

@ -307,7 +307,7 @@
++ mere :: continue init ++ mere :: continue init
~& [%dill-mere our ram] ~& [%dill-mere our ram]
^+ . ^+ .
=/ myt (flop (need tem)) =/ myt (flop (fall tem ~))
=/ can (clan:title our) =/ can (clan:title our)
=. tem ~ =. tem ~
=. moz :_(moz [hen %pass ~ %g %conf [[our ram] %load our %home]]) =. moz :_(moz [hen %pass ~ %g %conf [[our ram] %load our %home]])