2021-01-11 22:39:36 +03:00
|
|
|
/- spider, grp=group-store, gra=graph-store, met=metadata-store
|
2020-12-01 01:30:20 +03:00
|
|
|
/+ strandio, res=resource
|
|
|
|
::
|
|
|
|
=* strand strand:spider
|
|
|
|
=* raw-poke raw-poke:strandio
|
2021-01-14 01:50:39 +03:00
|
|
|
=* raw-poke-our raw-poke-our:strandio
|
2020-12-01 01:30:20 +03:00
|
|
|
=* scry scry:strandio
|
|
|
|
::
|
|
|
|
^- thread:spider
|
|
|
|
|= arg=vase
|
|
|
|
=/ m (strand ,vase)
|
|
|
|
^- form:m
|
2020-12-04 15:45:35 +03:00
|
|
|
=+ !<([~ =update:grp] arg)
|
2020-12-01 01:30:20 +03:00
|
|
|
?. ?=(%remove-group -.update)
|
|
|
|
(pure:m !>(~))
|
|
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
2020-12-02 00:20:45 +03:00
|
|
|
:: tell group host to remove us as member
|
|
|
|
::
|
|
|
|
;< ~ bind:m
|
|
|
|
%+ raw-poke
|
|
|
|
[entity.resource.update %group-push-hook]
|
2021-03-11 07:00:50 +03:00
|
|
|
:- %group-update-0
|
2020-12-02 00:20:45 +03:00
|
|
|
!> ^- update:grp
|
|
|
|
[%remove-members resource.update (silt [our.bowl ~])]
|
|
|
|
:: stop serving or syncing group updates
|
|
|
|
::
|
|
|
|
;< ~ bind:m
|
|
|
|
%+ raw-poke
|
|
|
|
[our.bowl %group-push-hook]
|
|
|
|
:- %push-hook-action
|
|
|
|
!>([%remove resource.update])
|
|
|
|
;< ~ bind:m
|
|
|
|
%+ raw-poke
|
|
|
|
[our.bowl %group-pull-hook]
|
|
|
|
:- %pull-hook-action
|
|
|
|
!>([%remove resource.update])
|
2020-12-01 01:59:30 +03:00
|
|
|
:: stop serving or syncing metadata associated with group
|
|
|
|
::
|
2020-12-01 01:30:20 +03:00
|
|
|
;< ~ bind:m
|
2021-01-14 01:50:39 +03:00
|
|
|
%- raw-poke-our
|
|
|
|
?: =(our.bowl entity.resource.update)
|
|
|
|
:- %metadata-push-hook
|
|
|
|
push-hook-action+!>([%remove resource.update])
|
|
|
|
:- %metadata-pull-hook
|
|
|
|
pull-hook-action+!>([%remove resource.update])
|
2020-12-01 01:30:20 +03:00
|
|
|
;< =associations:met bind:m
|
|
|
|
%+ scry associations:met
|
|
|
|
;: weld
|
|
|
|
/gx/metadata-store/group
|
|
|
|
(en-path:res resource.update)
|
|
|
|
/noun
|
|
|
|
==
|
2021-01-30 01:38:32 +03:00
|
|
|
=/ entries=(list [m=md-resource:met g=resource:res *])
|
2021-01-14 01:50:39 +03:00
|
|
|
~(tap by associations)
|
2020-12-01 01:59:30 +03:00
|
|
|
|- ^- form:m
|
|
|
|
=* loop $
|
|
|
|
?~ entries
|
|
|
|
(pure:m !>(~))
|
|
|
|
:: remove metadata associated with group
|
|
|
|
::
|
2020-12-01 01:30:20 +03:00
|
|
|
;< ~ bind:m
|
2020-12-01 01:59:30 +03:00
|
|
|
%+ raw-poke
|
|
|
|
[our.bowl %metadata-store]
|
|
|
|
:- %metadata-action
|
2021-01-30 01:38:32 +03:00
|
|
|
!> ^- action:met
|
2020-12-01 01:59:30 +03:00
|
|
|
[%remove g.i.entries m.i.entries]
|
|
|
|
:: archive graph associated with group
|
|
|
|
::
|
2021-01-14 01:50:39 +03:00
|
|
|
=* app-resource resource.m.i.entries
|
2020-12-01 01:59:30 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
%+ raw-poke
|
|
|
|
[our.bowl %graph-store]
|
2021-03-11 07:00:50 +03:00
|
|
|
:- %graph-update-0
|
2020-12-01 01:59:30 +03:00
|
|
|
!> ^- update:gra
|
2021-01-14 01:50:39 +03:00
|
|
|
[%0 now.bowl [%archive-graph app-resource]]
|
2020-12-01 21:51:26 +03:00
|
|
|
;< ~ bind:m
|
|
|
|
%+ raw-poke
|
|
|
|
[our.bowl %graph-pull-hook]
|
|
|
|
:- %pull-hook-action
|
2021-01-14 01:50:39 +03:00
|
|
|
!>([%remove app-resource])
|
2020-12-01 01:59:30 +03:00
|
|
|
loop(entries t.entries)
|