mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 19:05:48 +03:00
Merge baf365b63b
into release/next-js
This commit is contained in:
commit
6a38c01b47
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:abc163491b53cc9d48a70ea378dde8bb455648e3f6e7f57a0c7a8e164d4ca105
|
||||
size 10226599
|
||||
oid sha256:accbadc701471f6b071ed286164a0bf4d3f8a2e64cfaea9019e123bd9edca569
|
||||
size 10292454
|
||||
|
@ -5,7 +5,7 @@
|
||||
/- glob
|
||||
/+ default-agent, verb, dbug
|
||||
|%
|
||||
++ hash 0v2i7ds.j99ka.5dpja.pef1e.b04e0
|
||||
++ hash 0v4.7tk5q.9ha4l.tbmji.fvkno.s9pfq
|
||||
+$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))]
|
||||
+$ all-states
|
||||
$% state-0
|
||||
|
@ -46,19 +46,8 @@
|
||||
%0
|
||||
%_ $
|
||||
-.old %1
|
||||
::
|
||||
validators.old
|
||||
(~(put in validators.old) %graph-validator-link)
|
||||
::
|
||||
cards
|
||||
%+ weld cards
|
||||
%+ turn
|
||||
~(tap in (~(put in validators.old) %graph-validator-link))
|
||||
|= validator=@t
|
||||
^- card
|
||||
=/ =wire /validator/[validator]
|
||||
=/ =rave:clay [%sing %b [%da now.bowl] /[validator]]
|
||||
[%pass wire %arvo %c %warp our.bowl [%home `rave]]
|
||||
cards cards
|
||||
validators.old validators.old
|
||||
::
|
||||
graphs.old
|
||||
%- ~(run by graphs.old)
|
||||
@ -285,19 +274,10 @@
|
||||
graphs (~(put by graphs) resource [graph mark])
|
||||
update-logs (~(put by update-logs) resource update-log)
|
||||
archive (~(del by archive) resource)
|
||||
::
|
||||
validators
|
||||
?~ mark validators
|
||||
(~(put in validators) u.mark)
|
||||
==
|
||||
%- zing
|
||||
:~ (give [/keys ~] %keys (~(put in ~(key by graphs)) resource))
|
||||
(give [/updates ~] %add-graph resource *graph:store mark overwrite)
|
||||
?~ mark ~
|
||||
?: (~(has in validators) u.mark) ~
|
||||
=/ wire /validator/[u.mark]
|
||||
=/ =rave:clay [%sing %b [%da now.bowl] /[u.mark]]
|
||||
[%pass wire %arvo %c %warp our.bowl [%home `rave]]~
|
||||
==
|
||||
::
|
||||
++ remove-graph
|
||||
@ -1120,12 +1100,7 @@
|
||||
::
|
||||
:: old wire, do nothing
|
||||
[%graph *] [~ this]
|
||||
::
|
||||
[%validator @ ~]
|
||||
:_ this
|
||||
=* validator i.t.wire
|
||||
=/ =rave:clay [%next %b [%da now.bowl] /[validator]]
|
||||
[%pass wire %arvo %c %warp our.bowl [%home `rave]]~
|
||||
[%validator @ ~] [~ this]
|
||||
::
|
||||
[%try-rejoin @ *]
|
||||
=/ rid=resource:store (de-path:res t.t.wire)
|
||||
|
@ -24,6 +24,6 @@
|
||||
<div id="portal-root"></div>
|
||||
<script src="/~landscape/js/channel.js"></script>
|
||||
<script src="/~landscape/js/session.js"></script>
|
||||
<script src="/~landscape/js/bundle/index.3a0ba646997cd338b513.js"></script>
|
||||
<script src="/~landscape/js/bundle/index.857da0dbc92427b1460b.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -14,6 +14,7 @@
|
||||
[%2 observers=(map serial observer:sur)]
|
||||
[%3 observers=(map serial observer:sur)]
|
||||
[%4 observers=(map serial observer:sur)]
|
||||
[%5 observers=(map serial observer:sur) warm-cache=_|]
|
||||
==
|
||||
::
|
||||
+$ serial @uv
|
||||
@ -27,7 +28,7 @@
|
||||
--
|
||||
::
|
||||
%- agent:dbug
|
||||
=| [%4 observers=(map serial observer:sur)]
|
||||
=| [%5 observers=(map serial observer:sur) warm-cache=_|]
|
||||
=* state -
|
||||
::
|
||||
^- agent:gall
|
||||
@ -42,6 +43,7 @@
|
||||
(act [%watch %group-store /groups %group-on-leave])
|
||||
(act [%watch %group-store /groups %group-on-remove-member])
|
||||
(act [%watch %metadata-store /updates %md-on-add-group-feed])
|
||||
(act [%warm-cache-all ~])
|
||||
==
|
||||
::
|
||||
++ act
|
||||
@ -66,8 +68,13 @@
|
||||
=| cards=(list card)
|
||||
|-
|
||||
?- -.old-state
|
||||
%4
|
||||
%5
|
||||
[cards this(state old-state)]
|
||||
%4
|
||||
=. cards
|
||||
:_ cards
|
||||
(act [%warm-cache-all ~])
|
||||
$(old-state [%5 observers.old-state %.n])
|
||||
::
|
||||
%3
|
||||
=. cards
|
||||
@ -110,11 +117,19 @@
|
||||
?> (team:title our.bowl src.bowl)
|
||||
?. ?=(%observe-action mark)
|
||||
(on-poke:def mark vase)
|
||||
|^
|
||||
=/ =action:sur !<(action:sur vase)
|
||||
=* observer observer.action
|
||||
=/ vals (silt ~(val by observers))
|
||||
?- -.action
|
||||
%watch
|
||||
%watch (watch observer vals)
|
||||
%ignore (ignore observer vals)
|
||||
%warm-cache-all warm-cache-all
|
||||
%cool-cache-all cool-cache-all
|
||||
==
|
||||
::
|
||||
++ watch
|
||||
|= [=observer:sur vals=(set observer:sur)]
|
||||
?: ?|(=(app.observer %spider) =(app.observer %observe-hook))
|
||||
~|('we avoid infinite loops' !!)
|
||||
?: (~(has in vals) observer)
|
||||
@ -129,7 +144,8 @@
|
||||
path.observer
|
||||
==
|
||||
::
|
||||
%ignore
|
||||
++ ignore
|
||||
|= [=observer:sur vals=(set observer:sur)]
|
||||
?. (~(has in vals) observer)
|
||||
~|('cannot remove nonexistent observer' !!)
|
||||
=/ key (got-by-val observers observer)
|
||||
@ -142,7 +158,19 @@
|
||||
%leave
|
||||
~
|
||||
==
|
||||
==
|
||||
::
|
||||
++ warm-cache-all
|
||||
?: warm-cache
|
||||
~|('cannot warm up cache that is already warm' !!)
|
||||
:_ this(warm-cache %.y)
|
||||
=/ =rave:clay [%sing [%t da+now.bowl /mar]]
|
||||
[%pass /warm-cache %arvo %c %warp our.bowl %home `rave]~
|
||||
::
|
||||
++ cool-cache-all
|
||||
?. warm-cache
|
||||
~|('cannot cool down cache that is already cool' !!)
|
||||
[~ this(warm-cache %.n)]
|
||||
--
|
||||
::
|
||||
++ on-agent
|
||||
|= [=wire =sign:agent:gall]
|
||||
@ -260,9 +288,48 @@
|
||||
== ==
|
||||
--
|
||||
::
|
||||
++ on-arvo
|
||||
|= [=wire =sign-arvo]
|
||||
^- (quip card _this)
|
||||
:_ this
|
||||
?+ wire (on-arvo:def wire sign-arvo)
|
||||
[%warm-cache ~]
|
||||
?. warm-cache
|
||||
~
|
||||
?> ?=([%clay %writ *] sign-arvo)
|
||||
=* riot p.sign-arvo
|
||||
?~ riot
|
||||
=/ =rave:clay [%next [%t da+now.bowl /mar]]
|
||||
[%pass /warm-cache %arvo %c %warp our.bowl %home `rave]~
|
||||
:- =/ =rave:clay [%next [%t q.p.u.riot /mar]]
|
||||
[%pass /warm-cache %arvo %c %warp our.bowl %home `rave]
|
||||
%+ turn !<((list path) q.r.u.riot)
|
||||
|= pax=path
|
||||
^- card
|
||||
=. pax (snip (slag 1 pax))
|
||||
=/ mark=@ta
|
||||
%+ roll pax
|
||||
|= [=term mark=term]
|
||||
?: ?=(%$ mark)
|
||||
term
|
||||
:((cury cat 3) mark '-' term)
|
||||
=/ =rave:clay [%sing %b da+now.bowl /[mark]]
|
||||
[%pass [%mar mark ~] %arvo %c %warp our.bowl %home `rave]
|
||||
::
|
||||
[%mar ^]
|
||||
?. warm-cache
|
||||
~
|
||||
?> ?=([%clay %writ *] sign-arvo)
|
||||
=* riot p.sign-arvo
|
||||
=* mark t.wire
|
||||
?~ riot
|
||||
~
|
||||
=/ =rave:clay [%next %b q.p.u.riot mark]
|
||||
[%pass wire %arvo %c %warp our.bowl %home `rave]~
|
||||
==
|
||||
::
|
||||
++ on-watch on-watch:def
|
||||
++ on-leave on-leave:def
|
||||
++ on-peek on-peek:def
|
||||
++ on-arvo on-arvo:def
|
||||
++ on-fail on-fail:def
|
||||
--
|
||||
|
@ -1,7 +1,14 @@
|
||||
|%
|
||||
+$ observer [app=term =path thread=term]
|
||||
+$ action
|
||||
$% [%watch =observer]
|
||||
$% :: %gall actions
|
||||
::
|
||||
[%watch =observer]
|
||||
[%ignore =observer]
|
||||
::
|
||||
:: %clay actions
|
||||
::
|
||||
[%warm-cache-all ~]
|
||||
[%cool-cache-all ~]
|
||||
==
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user