mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
graph-push-hook: prevent fuse-loop
This commit is contained in:
parent
22d1348e57
commit
63dc2f4c36
@ -83,12 +83,13 @@
|
|||||||
!< $-([index:store post:store atom ?] [index:store post:store])
|
!< $-([index:store post:store atom ?] [index:store post:store])
|
||||||
%. !>(*indexed-post:store)
|
%. !>(*indexed-post:store)
|
||||||
.^(tube:clay (scry:hc %cc %home /[u.mark]/transform-add-nodes))
|
.^(tube:clay (scry:hc %cc %home /[u.mark]/transform-add-nodes))
|
||||||
=/ [* lis=(list [index:store node:store])]
|
=/ [* result=(list [index:store node:store])]
|
||||||
%+ roll
|
%+ roll
|
||||||
(flatten-node-map ~(tap by nodes.q.update))
|
(flatten-node-map ~(tap by nodes.q.update))
|
||||||
(transform-list transform)
|
(transform-list transform)
|
||||||
=. nodes.q.update
|
=. nodes.q.update
|
||||||
(~(gas by *(map index:store node:store)) lis)
|
%- ~(gas by *(map index:store node:store))
|
||||||
|
result
|
||||||
[~ !>(update)]
|
[~ !>(update)]
|
||||||
::
|
::
|
||||||
++ flatten-node-map
|
++ flatten-node-map
|
||||||
@ -96,7 +97,7 @@
|
|||||||
^- (list [index:store node:store])
|
^- (list [index:store node:store])
|
||||||
|^
|
|^
|
||||||
%- sort-nodes
|
%- sort-nodes
|
||||||
%+ weld
|
%+ welp
|
||||||
(turn lis empty-children)
|
(turn lis empty-children)
|
||||||
%- zing
|
%- zing
|
||||||
%+ turn lis
|
%+ turn lis
|
||||||
@ -112,9 +113,9 @@
|
|||||||
[index node(children [%empty ~])]
|
[index node(children [%empty ~])]
|
||||||
::
|
::
|
||||||
++ sort-nodes
|
++ sort-nodes
|
||||||
|= lis=(list [index:store node:store])
|
|= unsorted=(list [index:store node:store])
|
||||||
^- (list [index:store node:store])
|
^- (list [index:store node:store])
|
||||||
%+ sort lis
|
%+ sort unsorted
|
||||||
|= [p=[=index:store *] q=[=index:store *]]
|
|= [p=[=index:store *] q=[=index:store *]]
|
||||||
^- ?
|
^- ?
|
||||||
(lth (lent index.p) (lent index.q))
|
(lth (lent index.p) (lent index.q))
|
||||||
|
Loading…
Reference in New Issue
Block a user