2020-08-05 06:55:12 +03:00
|
|
|
:: lib/pull-hook: helper for creating a push hook
|
2020-08-01 04:11:13 +03:00
|
|
|
::
|
|
|
|
:: lib/pull-hook is a helper for automatically pulling data from a
|
|
|
|
:: corresponding push-hook to a store.
|
|
|
|
::
|
|
|
|
:: ## Interfacing notes:
|
|
|
|
::
|
2020-09-03 03:13:29 +03:00
|
|
|
:: The inner door may interact with the library by producing cards.
|
|
|
|
:: Do not pass any cards on a wire beginning with /helper as these
|
|
|
|
:: wires are reserved by this library. Any watches/pokes/peeks not
|
|
|
|
:: listed below will be routed to the inner door.
|
2020-08-01 04:11:13 +03:00
|
|
|
::
|
|
|
|
:: ## Subscription paths
|
|
|
|
::
|
|
|
|
:: /tracking: The set of resources we are pulling
|
|
|
|
::
|
|
|
|
:: ## Pokes
|
|
|
|
::
|
|
|
|
:: %pull-hook-action: Add/remove a resource from pulling.
|
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
/- *pull-hook
|
|
|
|
/+ default-agent, resource
|
|
|
|
::
|
|
|
|
::
|
|
|
|
|%
|
|
|
|
+$ card card:agent:gall
|
|
|
|
::
|
2020-08-01 04:11:13 +03:00
|
|
|
:: $config: configuration for the pull hook
|
|
|
|
::
|
2020-08-05 06:55:12 +03:00
|
|
|
:: .store-name: name of the store to send subscription updates to.
|
2020-08-01 04:11:13 +03:00
|
|
|
:: .update-mark: mark that updates will be tagged with
|
|
|
|
:: .push-hook-name: name of the corresponding push-hook
|
2020-08-05 06:55:12 +03:00
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
+$ config
|
|
|
|
$: store-name=term
|
|
|
|
update=mold
|
|
|
|
update-mark=term
|
|
|
|
push-hook-name=term
|
|
|
|
==
|
2020-08-01 04:11:13 +03:00
|
|
|
::
|
2020-11-06 04:40:08 +03:00
|
|
|
:: $base-state-0: state for the pull hook
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
2020-08-01 04:11:13 +03:00
|
|
|
:: .tracking: a map of resources we are pulling, and the ships that
|
|
|
|
:: we are pulling them from.
|
|
|
|
:: .inner-state: state given to internal door
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
2020-11-06 04:40:08 +03:00
|
|
|
+$ base-state-0
|
2020-11-06 05:03:14 +03:00
|
|
|
$: tracking=(map resource ship)
|
|
|
|
inner-state=vase
|
2020-06-08 10:53:16 +03:00
|
|
|
==
|
|
|
|
::
|
2020-11-26 09:09:14 +03:00
|
|
|
+$ base-state-1
|
|
|
|
$: base-state-0
|
|
|
|
failed-kicks=(map resource ship)
|
|
|
|
==
|
|
|
|
::
|
2020-11-06 04:40:08 +03:00
|
|
|
+$ state-0 [%0 base-state-0]
|
|
|
|
::
|
|
|
|
+$ state-1 [%1 base-state-0]
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
2020-11-26 09:09:14 +03:00
|
|
|
+$ state-2 [%2 base-state-1]
|
|
|
|
::
|
2020-11-06 04:40:08 +03:00
|
|
|
+$ versioned-state
|
|
|
|
$% state-0
|
|
|
|
state-1
|
2020-11-26 09:09:14 +03:00
|
|
|
state-2
|
2020-06-08 10:53:16 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ default
|
|
|
|
|* [pull-hook=* =config]
|
|
|
|
|_ =bowl:gall
|
|
|
|
::
|
|
|
|
++ on-pull-nack
|
|
|
|
|= [=resource =tang]
|
|
|
|
=/ =tank leaf+"subscribe failed from {<dap.bowl>} for {<resource>}"
|
|
|
|
%- (slog tank tang)
|
|
|
|
[~ pull-hook]
|
|
|
|
::
|
|
|
|
++ on-pull-kick
|
|
|
|
|= =resource
|
|
|
|
*(unit path)
|
|
|
|
--
|
|
|
|
::
|
|
|
|
++ pull-hook
|
|
|
|
|* config
|
|
|
|
$_ ^|
|
|
|
|
|_ bowl:gall
|
2020-08-05 06:55:12 +03:00
|
|
|
:: +on-pull-nack: handle failed pull subscription
|
|
|
|
::
|
|
|
|
:: This arm is called when a pull subscription fails. lib/pull-hook
|
|
|
|
:: will automatically delete the resource from .tracking by the
|
|
|
|
:: time this arm is called.
|
|
|
|
::
|
|
|
|
++ on-pull-nack
|
|
|
|
|~ [resource tang]
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
:: +on-pull-kick: produce any additional resubscribe path
|
|
|
|
::
|
|
|
|
:: If non-null, the produced path is appended to the original
|
|
|
|
:: subscription path. This should be used to encode extra
|
|
|
|
:: information onto the path in order to reduce the payload of a
|
|
|
|
:: kick and resubscribe.
|
|
|
|
::
|
|
|
|
:: If null, a resubscribe is not attempted
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
2020-08-05 06:55:12 +03:00
|
|
|
++ on-pull-kick
|
|
|
|
|~ resource
|
|
|
|
*(unit path)
|
|
|
|
::
|
2020-08-01 04:11:13 +03:00
|
|
|
:: from agent:gall
|
2020-06-08 10:53:16 +03:00
|
|
|
++ on-init
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
::
|
|
|
|
++ on-save
|
|
|
|
*vase
|
|
|
|
::
|
|
|
|
++ on-load
|
|
|
|
|~ vase
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
::
|
|
|
|
++ on-poke
|
|
|
|
|~ [mark vase]
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
::
|
|
|
|
++ on-watch
|
|
|
|
|~ path
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
::
|
|
|
|
++ on-leave
|
|
|
|
|~ path
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
::
|
|
|
|
++ on-peek
|
|
|
|
|~ path
|
|
|
|
*(unit (unit cage))
|
|
|
|
::
|
|
|
|
++ on-agent
|
|
|
|
|~ [wire sign:agent:gall]
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
::
|
|
|
|
++ on-arvo
|
|
|
|
|~ [wire sign-arvo]
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
::
|
|
|
|
++ on-fail
|
|
|
|
|~ [term tang]
|
|
|
|
*[(list card) _^|(..on-init)]
|
|
|
|
--
|
|
|
|
++ agent
|
|
|
|
|* =config
|
|
|
|
|= =(pull-hook config)
|
2020-11-26 09:09:14 +03:00
|
|
|
=| state-2
|
2020-06-08 10:53:16 +03:00
|
|
|
=* state -
|
|
|
|
^- agent:gall
|
|
|
|
=<
|
|
|
|
|_ =bowl:gall
|
|
|
|
+* this .
|
|
|
|
og ~(. pull-hook bowl)
|
|
|
|
hc ~(. +> bowl)
|
|
|
|
def ~(. (default-agent this %|) bowl)
|
2020-12-04 04:49:10 +03:00
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
++ on-init
|
|
|
|
^- [(list card:agent:gall) agent:gall]
|
|
|
|
=^ cards pull-hook
|
|
|
|
on-init:og
|
|
|
|
[cards this]
|
2020-11-26 09:09:14 +03:00
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
++ on-load
|
|
|
|
|= =old=vase
|
|
|
|
=/ old
|
2020-11-06 04:40:08 +03:00
|
|
|
!<(versioned-state old-vase)
|
|
|
|
=| cards=(list card:agent:gall)
|
|
|
|
|^
|
|
|
|
?- -.old
|
2020-11-26 09:09:14 +03:00
|
|
|
%2
|
2020-11-06 04:40:08 +03:00
|
|
|
=^ og-cards pull-hook
|
|
|
|
(on-load:og inner-state.old)
|
2020-11-26 09:09:14 +03:00
|
|
|
=. state old
|
|
|
|
=^ retry-cards state
|
|
|
|
retry-failed-kicks
|
|
|
|
:_ this
|
|
|
|
:(weld cards og-cards retry-cards)
|
|
|
|
::
|
|
|
|
%1 $(old [%2 +.old ~])
|
2020-11-06 04:40:08 +03:00
|
|
|
::
|
|
|
|
%0
|
|
|
|
%_ $
|
|
|
|
-.old %1
|
|
|
|
::
|
|
|
|
cards
|
|
|
|
(weld cards (missing-subscriptions tracking.old))
|
|
|
|
==
|
|
|
|
==
|
2020-11-26 09:09:14 +03:00
|
|
|
::
|
|
|
|
++ retry-failed-kicks
|
|
|
|
=| acc-cards=(list card)
|
|
|
|
=/ failures=(list [rid=resource =ship])
|
|
|
|
~(tap by failed-kicks)
|
|
|
|
=. tracking
|
|
|
|
(~(uni by tracking) failed-kicks)
|
|
|
|
=. failed-kicks ~
|
|
|
|
|- ^- (quip card _state)
|
|
|
|
?~ failures
|
|
|
|
[acc-cards state]
|
|
|
|
=, failures
|
|
|
|
=^ crds state
|
|
|
|
(handle-kick:hc i)
|
|
|
|
$(failures t, acc-cards (weld acc-cards crds))
|
|
|
|
::
|
2020-11-06 04:40:08 +03:00
|
|
|
++ missing-subscriptions
|
|
|
|
|= tracking=(map resource ship)
|
|
|
|
^- (list card:agent:gall)
|
|
|
|
%+ murn
|
|
|
|
~(tap by tracking)
|
|
|
|
|= [rid=resource =ship]
|
|
|
|
^- (unit card:agent:gall)
|
|
|
|
=/ =path
|
2020-11-06 05:05:51 +03:00
|
|
|
resource+(en-path:resource rid)
|
2020-11-06 04:40:08 +03:00
|
|
|
=/ =wire
|
2020-11-06 05:08:08 +03:00
|
|
|
(make-wire pull+path)
|
2020-11-06 04:40:08 +03:00
|
|
|
?: (~(has by wex.bowl) [wire ship push-hook-name.config])
|
|
|
|
~
|
|
|
|
`[%pass wire %agent [ship push-hook-name.config] %watch path]
|
|
|
|
--
|
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
++ on-save
|
|
|
|
^- vase
|
|
|
|
=. inner-state
|
|
|
|
on-save:og
|
|
|
|
!>(state)
|
2020-11-25 09:01:07 +03:00
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
++ on-poke
|
|
|
|
|= [=mark =vase]
|
|
|
|
^- [(list card:agent:gall) agent:gall]
|
2021-01-26 04:10:39 +03:00
|
|
|
?+ mark
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-poke:og mark vase)
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
%sane
|
|
|
|
?> (team:title [our src]:bowl)
|
|
|
|
=^ cards state
|
|
|
|
poke-sane:hc
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
%pull-hook-action
|
|
|
|
?> (team:title [our src]:bowl)
|
|
|
|
=^ cards state
|
|
|
|
(poke-hook-action:hc !<(action vase))
|
|
|
|
[cards this]
|
|
|
|
==
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
|
|
|
++ on-watch
|
|
|
|
|= =path
|
|
|
|
^- [(list card:agent:gall) agent:gall]
|
|
|
|
?> (team:title our.bowl src.bowl)
|
|
|
|
?. ?=([%tracking ~] path)
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-watch:og path)
|
|
|
|
[cards this]
|
|
|
|
:_ this
|
|
|
|
~[give-update]
|
|
|
|
::
|
|
|
|
++ on-agent
|
|
|
|
|= [=wire =sign:agent:gall]
|
|
|
|
^- [(list card:agent:gall) agent:gall]
|
|
|
|
?. ?=([%helper %pull-hook @ *] wire)
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-agent:og wire sign)
|
|
|
|
[cards this]
|
|
|
|
?. ?=([%pull %resource *] t.t.wire)
|
|
|
|
(on-agent:def wire sign)
|
|
|
|
=/ rid=resource
|
|
|
|
(de-path:resource t.t.t.t.wire)
|
|
|
|
?+ -.sign (on-agent:def wire sign)
|
|
|
|
%kick
|
2020-11-26 09:09:14 +03:00
|
|
|
=^ cards state
|
|
|
|
(handle-kick:hc rid src.bowl)
|
|
|
|
[cards this]
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
|
|
|
%watch-ack
|
|
|
|
?~ p.sign
|
|
|
|
[~ this]
|
|
|
|
=. tracking
|
|
|
|
(~(del by tracking) rid)
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-pull-nack:og rid u.p.sign)
|
|
|
|
:_ this
|
|
|
|
[give-update cards]
|
|
|
|
::
|
|
|
|
%fact
|
|
|
|
?. =(update-mark.config p.cage.sign)
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-agent:og wire sign)
|
|
|
|
[cards this]
|
|
|
|
:_ this
|
2021-01-26 03:09:31 +03:00
|
|
|
~[(update-store:hc rid q.cage.sign)]
|
2020-06-08 10:53:16 +03:00
|
|
|
==
|
|
|
|
++ on-leave
|
|
|
|
|= =path
|
|
|
|
^- [(list card:agent:gall) agent:gall]
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-leave:og path)
|
|
|
|
[cards this]
|
|
|
|
::
|
|
|
|
++ on-arvo
|
|
|
|
|= [=wire =sign-arvo]
|
|
|
|
^- [(list card:agent:gall) agent:gall]
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-arvo:og wire sign-arvo)
|
|
|
|
[cards this]
|
|
|
|
++ on-fail
|
|
|
|
|= [=term =tang]
|
|
|
|
^- [(list card:agent:gall) agent:gall]
|
|
|
|
=^ cards pull-hook
|
|
|
|
(on-fail:og term tang)
|
|
|
|
[cards this]
|
2020-09-01 08:11:48 +03:00
|
|
|
++ on-peek
|
|
|
|
|= =path
|
|
|
|
^- (unit (unit cage))
|
2020-11-30 06:34:55 +03:00
|
|
|
?. =(/x/tracking path)
|
2020-09-01 08:11:48 +03:00
|
|
|
(on-peek:og path)
|
|
|
|
``noun+!>(~(key by tracking))
|
2020-06-08 10:53:16 +03:00
|
|
|
--
|
|
|
|
|_ =bowl:gall
|
|
|
|
+* og ~(. pull-hook bowl)
|
2020-11-30 06:34:55 +03:00
|
|
|
++ poke-sane
|
|
|
|
^- (quip card:agent:gall _state)
|
|
|
|
=/ cards
|
|
|
|
restart-subscriptions
|
|
|
|
~? > ?=(^ cards)
|
|
|
|
"Fixed subscriptions in {<dap.bowl>}"
|
|
|
|
:_ state
|
|
|
|
restart-subscriptions
|
|
|
|
::
|
|
|
|
++ check-subscription
|
|
|
|
|= [rid=resource =ship]
|
|
|
|
^- ?
|
|
|
|
%+ lien
|
|
|
|
~(tap in ~(key by wex.bowl))
|
|
|
|
|= [=wire her=^ship app=term]
|
|
|
|
^- ?
|
|
|
|
?& =(app push-hook-name.config)
|
|
|
|
=(ship her)
|
|
|
|
=((scag 4 wire) /helper/pull-hook/pull/resource)
|
|
|
|
=(`rid (de-path-soft:resource (slag 4 wire)))
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ restart-subscriptions
|
|
|
|
^- (list card:agent:gall)
|
2020-12-08 05:59:46 +03:00
|
|
|
%- zing
|
|
|
|
%+ turn
|
2020-11-30 06:34:55 +03:00
|
|
|
~(tap by tracking)
|
|
|
|
|= [rid=resource =ship]
|
2020-12-08 05:59:46 +03:00
|
|
|
^- (list card:agent:gall)
|
2020-11-30 06:34:55 +03:00
|
|
|
?: (check-subscription rid ship) ~
|
|
|
|
~& >> "restarting: {<rid>}"
|
|
|
|
=/ pax=(unit path)
|
|
|
|
(on-pull-kick:og rid)
|
|
|
|
?~ pax ~
|
2020-12-08 05:59:46 +03:00
|
|
|
(watch-resource rid u.pax)
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
2020-11-26 09:09:14 +03:00
|
|
|
++ mule-scry
|
|
|
|
|= [ref=* raw=*]
|
|
|
|
=/ pax=(unit path)
|
|
|
|
((soft path) raw)
|
|
|
|
?~ pax ~
|
|
|
|
?. ?=([@ @ @ @ *] u.pax) ~
|
|
|
|
=/ ship
|
|
|
|
(slaw %p i.t.u.pax)
|
|
|
|
=/ ved
|
|
|
|
(slay i.t.t.t.u.pax)
|
|
|
|
=/ dat
|
|
|
|
?~ ved now.bowl
|
|
|
|
=/ cas=(unit case)
|
|
|
|
((soft case) p.u.ved)
|
|
|
|
?~ cas now.bowl
|
|
|
|
?: ?=(%da -.u.cas)
|
|
|
|
p.u.cas
|
|
|
|
now.bowl
|
|
|
|
:: catch bad gall scries early
|
2020-12-04 23:31:05 +03:00
|
|
|
?: ?& =((end 3 i.u.pax) %g)
|
2020-11-26 09:09:14 +03:00
|
|
|
?| !=(`our.bowl ship)
|
|
|
|
!=(dat now.bowl)
|
|
|
|
==
|
|
|
|
==
|
|
|
|
~
|
|
|
|
``.^(* u.pax)
|
2020-12-04 22:24:42 +03:00
|
|
|
::
|
2020-11-26 09:09:14 +03:00
|
|
|
++ handle-kick
|
|
|
|
|= [rid=resource =ship]
|
|
|
|
^- (quip card _state)
|
|
|
|
=/ res=toon
|
|
|
|
(mock [|.((on-pull-kick:og rid)) %9 2 %0 1] mule-scry)
|
|
|
|
=/ pax=(unit path)
|
|
|
|
!< (unit path)
|
|
|
|
:- -:!>(*(unit path))
|
|
|
|
?:(?=(%0 -.res) p.res ~)
|
|
|
|
=? failed-kicks !?=(%0 -.res)
|
2020-12-04 22:24:42 +03:00
|
|
|
=/ =tang
|
2020-11-26 09:09:14 +03:00
|
|
|
:+ leaf+"failed kick handler, please report"
|
|
|
|
leaf+"{<rid>} in {(trip dap.bowl)}"
|
|
|
|
?: ?=(%2 -.res)
|
|
|
|
p.res
|
|
|
|
?> ?=(%1 -.res)
|
2020-12-05 00:11:22 +03:00
|
|
|
=/ maybe-path=(unit path) ((soft path) p.res)
|
|
|
|
?~ maybe-path ~
|
|
|
|
[(smyt u.maybe-path) ~]
|
2020-11-26 09:09:14 +03:00
|
|
|
%- (slog tang)
|
|
|
|
(~(put by failed-kicks) rid ship)
|
|
|
|
?^ pax
|
|
|
|
:_ state
|
|
|
|
(watch-resource rid u.pax)
|
|
|
|
=. tracking
|
|
|
|
(~(del by tracking) rid)
|
|
|
|
:_ state
|
|
|
|
~[give-update]
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
|
|
|
++ poke-hook-action
|
|
|
|
|= =action
|
|
|
|
^- [(list card:agent:gall) _state]
|
|
|
|
|^
|
|
|
|
?- -.action
|
|
|
|
%add (add +.action)
|
|
|
|
%remove (remove +.action)
|
|
|
|
==
|
|
|
|
++ add
|
|
|
|
|= [=ship =resource]
|
2020-07-09 02:52:41 +03:00
|
|
|
~| resource
|
2020-09-02 04:21:14 +03:00
|
|
|
?< |(=(our.bowl ship) =(our.bowl entity.resource))
|
2020-08-17 05:47:40 +03:00
|
|
|
?: (~(has by tracking) resource)
|
|
|
|
[~ state]
|
2020-06-08 10:53:16 +03:00
|
|
|
=. tracking
|
|
|
|
(~(put by tracking) resource ship)
|
|
|
|
:_ state
|
2020-11-26 08:42:23 +03:00
|
|
|
(watch-resource resource /)
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
|
|
|
++ remove
|
|
|
|
|= =resource
|
2020-11-25 09:01:07 +03:00
|
|
|
:- (leave-resource resource)
|
2020-06-08 10:53:16 +03:00
|
|
|
state(tracking (~(del by tracking) resource))
|
|
|
|
--
|
|
|
|
::
|
|
|
|
++ leave-resource
|
|
|
|
|= rid=resource
|
2020-11-25 09:01:07 +03:00
|
|
|
^- (list card)
|
2020-11-26 08:42:23 +03:00
|
|
|
=/ ship=(unit ship)
|
2020-11-25 09:01:07 +03:00
|
|
|
(~(get by tracking) rid)
|
2020-11-26 08:42:23 +03:00
|
|
|
?~ ship ~
|
2020-06-08 10:53:16 +03:00
|
|
|
=/ =wire
|
|
|
|
(make-wire pull+resource+(en-path:resource rid))
|
2020-11-26 08:42:23 +03:00
|
|
|
[%pass wire %agent [u.ship push-hook-name.config] %leave ~]~
|
2020-12-07 23:16:55 +03:00
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
++ watch-resource
|
|
|
|
|= [rid=resource pax=path]
|
2020-11-26 08:42:23 +03:00
|
|
|
^- (list card)
|
|
|
|
=/ ship=(unit ship)
|
|
|
|
(~(get by tracking) rid)
|
|
|
|
?~ ship ~
|
2020-06-08 10:53:16 +03:00
|
|
|
=/ =path
|
|
|
|
(welp resource+(en-path:resource rid) pax)
|
|
|
|
=/ =wire
|
2020-12-07 23:16:55 +03:00
|
|
|
(make-wire pull+resource+(en-path:resource rid))
|
2020-11-26 08:42:23 +03:00
|
|
|
[%pass wire %agent [u.ship push-hook-name.config] %watch path]~
|
2020-06-08 10:53:16 +03:00
|
|
|
::
|
|
|
|
++ make-wire
|
|
|
|
|= =wire
|
|
|
|
^+ wire
|
|
|
|
%+ weld
|
|
|
|
/helper/pull-hook
|
|
|
|
wire
|
|
|
|
::
|
2021-01-14 02:36:58 +03:00
|
|
|
++ get-conversion
|
|
|
|
.^ tube:clay
|
|
|
|
%cc (scot %p our.bowl) %home (scot %da now.bowl)
|
|
|
|
/[update-mark.config]/resource
|
|
|
|
==
|
|
|
|
::
|
2020-06-08 10:53:16 +03:00
|
|
|
++ give-update
|
|
|
|
^- card
|
|
|
|
[%give %fact ~[/tracking] %pull-hook-update !>(tracking)]
|
|
|
|
::
|
|
|
|
++ update-store
|
2021-01-14 02:36:58 +03:00
|
|
|
|= [wire-rid=resource =vase]
|
2020-06-08 10:53:16 +03:00
|
|
|
^- card
|
|
|
|
=/ =wire
|
|
|
|
(make-wire /store)
|
2021-01-14 02:36:58 +03:00
|
|
|
=+ !<(rid=resource (get-conversion vase))
|
|
|
|
?> =(src.bowl (~(got by tracking) rid))
|
|
|
|
?> =(wire-rid rid)
|
2020-06-08 10:53:16 +03:00
|
|
|
[%pass wire %agent [our.bowl store-name.config] %poke update-mark.config vase]
|
|
|
|
--
|
|
|
|
--
|