graph-update mark upgrade from 1 -> 2

This commit is contained in:
Logan Allen 2021-04-14 15:49:54 -05:00
parent 45fb7e69f3
commit 90fbaf6650
29 changed files with 49 additions and 46 deletions

View File

@ -169,7 +169,7 @@
::
%fact
?+ p.cage.sign ~|([dap.bowl %bad-sub-mark wire p.cage.sign] !!)
%graph-update-1
%graph-update-2
%- on-graph-update:tc
!<(update:graph q.cage.sign)
==

View File

@ -154,7 +154,7 @@
++ poke-graph-store
|= =update:graph-store
^- card
(poke-our %graph-store %graph-update-1 !>(update))
(poke-our %graph-store %graph-update-2 !>(update))
::
++ nobody
^- @p

View File

@ -9,7 +9,7 @@
update:store
%graph-update
%graph-push-hook
1 1
2 2
%.n
==
--
@ -41,7 +41,7 @@
%- (slog leaf+"nacked {<resource>}" tang)
:_ this
?. (~(has in get-keys:gra) resource) ~
=- [%pass /pull-nack %agent [our.bowl %graph-store] %poke %graph-update-1 -]~
=- [%pass /pull-nack %agent [our.bowl %graph-store] %poke %graph-update-2 -]~
!> ^- update:store
[now.bowl [%archive-graph resource]]
::

View File

@ -12,7 +12,7 @@
update:store
%graph-update
%graph-pull-hook
1 1
2 2
==
::
+$ agent (push-hook:push-hook config)

View File

@ -333,7 +333,10 @@
%+ ~(put by graphs)
resource
:_ mark
(remove-indices resource graph (sort ~(tap in indices) by-lent))
%^ remove-indices
resource
graph
(sort ~(tap in indices) by-lent)
==
::
++ by-lent
@ -563,7 +566,7 @@
++ give
|= [paths=(list path) update=action:store]
^- (list card)
[%give %fact paths [%graph-update-1 !>([now.bowl update])]]~
[%give %fact paths [%graph-update-2 !>([now.bowl update])]]~
--
::
++ debug
@ -616,15 +619,15 @@
``noun+!>(q.u.result)
::
[%x %keys ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!>(`update:store`[now.bowl [%keys ~(key by graphs)]])
::
[%x %tags ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!>(`update:store`[now.bowl [%tags ~(key by tag-queries)]])
::
[%x %tag-queries ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!>(`update:store`[now.bowl [%tag-queries tag-queries]])
::
[%x %graph @ @ ~]
@ -633,7 +636,7 @@
=/ result=(unit marked-graph:store)
(~(get by graphs) [ship term])
?~ result [~ ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!> ^- update:store
:- now.bowl
[%add-graph [ship term] `graph:store`p.u.result q.u.result %.y]
@ -648,7 +651,7 @@
?~ result
~& no-archived-graph+[ship term]
[~ ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!> ^- update:store
:- now.bowl
[%add-graph [ship term] `graph:store`p.u.result q.u.result %.y]
@ -664,7 +667,7 @@
=/ graph=(unit marked-graph:store)
(~(get by graphs) [ship term])
?~ graph [~ ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!> ^- update:store
:- now.bowl
:+ %add-nodes
@ -691,7 +694,7 @@
(turn t.t.t.t.path (cury slav %ud))
=/ node=(unit node:store) (get-node ship term index)
?~ node [~ ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!> ^- update:store
:- now.bowl
:+ %add-nodes
@ -710,7 +713,7 @@
=/ graph
(get-node-children ship term parent)
?~ graph [~ ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!> ^- update:store
:- now.bowl
:+ %add-nodes
@ -740,7 +743,7 @@
=/ children
(get-node-children ship term index)
?~ children [~ ~]
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!> ^- update:store
:- now.bowl
:+ %add-nodes
@ -766,7 +769,7 @@
?- -.children.u.node
%empty [~ ~]
%graph
:- ~ :- ~ :- %graph-update-1
:- ~ :- ~ :- %graph-update-2
!> ^- update:store
:- now.bowl
:+ %add-nodes

View File

@ -180,7 +180,7 @@
~[watch-graph:ha]
::
%fact
?. ?=(%graph-update-1 p.cage.sign)
?. ?=(%graph-update-2 p.cage.sign)
(on-agent:def wire sign)
=^ cards state
(graph-update !<(update:graph-store q.cage.sign))

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[=resource mark=(unit mark) overwrite=? ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%add-graph resource (gas:orm ~ ~) mark overwrite]]

View File

@ -12,9 +12,9 @@
contents.post contents
==
::
:- %graph-update-1
:- %graph-update-2
^- update
:- now
:+ %add-nodes [our name]
%- ~(gas by *(map index node))
~[[[now]~ [post [%empty ~]]]]
~[[[now]~ [[%& post] [%empty ~]]]]

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[[=resource =index] =signatures ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%add-signatures [resource index] signatures]]

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[=term =resource ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%add-tag term resource]]

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[=resource ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%archive-graph resource]]

View File

@ -4,7 +4,7 @@
|= $: [now=@da eny=@uvJ bec=beak]
[[=ship graph=term ~] ~]
==
:- %graph-update-1
:- %graph-update-2
=/ our (scot %p p.bec)
=/ wen (scot %da now)
=/ who (scot %p ship)

View File

@ -4,6 +4,6 @@
|= $: [now=@da eny=@uvJ bec=beak]
[[graph=term =path ~] ~]
==
:- %graph-update-1
:- %graph-update-2
=- ~& update=- -
.^(=update:graph-store %cx path)

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[=resource ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%remove-graph resource]]

View File

@ -1,10 +1,10 @@
:: graph-store|remove-nodes: remove nodes from a graph at indices
:: graph-store|remove-posts: remove nodes from a graph at indices
::
/- *graph-store
:- %say
|= $: [now=@da eny=@uvJ =beak]
[[=resource indices=(set index) ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%remove-nodes resource indices]]
[now [%remove-posts resource indices]]

View File

@ -6,6 +6,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[[=resource =index] =signatures ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%remove-signatures [resource index] signatures]]

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[=term =resource ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%remove-tag term resource]]

View File

@ -5,6 +5,6 @@
|= $: [now=@da eny=@uvJ =beak]
[[=resource ~] ~]
==
:- %graph-update-1
:- %graph-update-2
^- update
[now [%unarchive-graph resource]]

View File

@ -67,7 +67,7 @@
=/ real=(set resource:re)
=/ upd=update:ga
%+ scry update:ga
[%x %graph-store /keys/graph-update-1]
[%x %graph-store /keys/graph-update-2]
?> ?=(%keys -.q.upd)
resources.q.upd
:: count activity per channel

View File

@ -32,7 +32,7 @@
=/ hashes (nodes-to-pending-indices nodes.q.update)
;< ~ bind:m
%^ poke-our %graph-push-hook
%graph-update-1
%graph-update-2
!>(update)
(pure:m !>(`action:graph-view`[%pending-indices hashes]))
::

View File

@ -39,7 +39,7 @@
==
;< ~ bind:m
%+ poke-our %graph-store
:- %graph-update-1
:- %graph-update-2
!> ^- update:graph
[now.bowl %add-graph feed-rid *graph:graph `%graph-validator-post %&]
;< ~ bind:m

View File

@ -54,7 +54,7 @@
=/ =update:graph
[now.bowl %add-graph rid.action *graph:graph mark.action overwrite]
;< ~ bind:m
(poke-our %graph-store graph-update-1+!>(update))
(poke-our %graph-store graph-update-2+!>(update))
;< ~ bind:m
(poke-our %graph-push-hook %push-hook-action !>([%add rid.action]))
::

View File

@ -36,7 +36,7 @@
^- form:m
;< =bowl:spider bind:m get-bowl:strandio
;< ~ bind:m
(poke-our %graph-store %graph-update-1 !>([now.bowl %remove-graph rid]))
(poke-our %graph-store %graph-update-2 !>([now.bowl %remove-graph rid]))
;< ~ bind:m
(poke-our %graph-push-hook %push-hook-action !>([%remove rid]))
;< ~ bind:m

View File

@ -40,7 +40,7 @@
?: ?=([~ ^] feed.config.metadatum)
;< ~ bind:m
%+ poke-our %graph-store
:- %graph-update-1
:- %graph-update-2
!> ^- update:graph
[now.bowl [%archive-graph resource.u.u.feed.config.metadatum]]
(pure:m !>(~))

View File

@ -39,7 +39,7 @@
;< ~ bind:m
(poke-our %graph-pull-hook %pull-hook-action !>([%remove rid]))
;< ~ bind:m
(poke-our %graph-store %graph-update-1 !>([now [%remove-graph rid]]))
(poke-our %graph-store %graph-update-2 !>([now [%remove-graph rid]]))
(pure:m ~)
--
::

View File

@ -17,7 +17,7 @@
;< =bowl:spider bind:m get-bowl:strandio
:: unarchive graph and share it
;< ~ bind:m
(poke-our %graph-store %graph-update-1 !>([now.bowl %unarchive-graph rid]))
(poke-our %graph-store %graph-update-2 !>([now.bowl %unarchive-graph rid]))
;< ~ bind:m
(poke-our %graph-push-hook %push-hook-action !>([%add rid]))
::

View File

@ -70,7 +70,7 @@
;< ~ bind:m
%+ raw-poke
[our.bowl %graph-store]
:- %graph-update-1
:- %graph-update-2
!> ^- update:gra
[now.bowl [%archive-graph app-resource]]
;< ~ bind:m

View File

@ -12,9 +12,9 @@
|= [our=@p wen=@da rid=resource body=cord id=@]
=/ =index:post [id]~
=/ =post:post [our index wen [%text body]~ ~ ~]
=/ =node:graph-store [post %empty ~]
=/ =node:graph-store [[%& post] %empty ~]
=/ act=update:graph-store [wen %add-nodes rid (my [index node] ~)]
(poke-app our %graph-push-hook %graph-update-1 act)
(poke-app our %graph-push-hook %graph-update-2 act)
--
::
^- thread:spider

View File

@ -12,9 +12,9 @@
|= [our=@p wen=@da rid=resource body=cord id=@]
=/ =index:post [id]~
=/ =post:post [our index wen [%text body]~ ~ ~]
=/ =node:graph-store [post %empty ~]
=/ =node:graph-store [[%& post] %empty ~]
=/ act=update:graph-store [wen %add-nodes rid (my [index node] ~)]
(poke-app our %graph-push-hook %graph-update-1 act)
(poke-app our %graph-push-hook %graph-update-2 act)
--
::
^- thread:spider