Merge pull request #4120 from urbit/la/fix-leave

group-on-leave: soften de-path to fix thread and add thread back to observe-hook state
This commit is contained in:
Liam Fitzgerald 2020-12-11 11:45:01 +10:00 committed by GitHub
commit d2f467912e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -64,6 +64,9 @@
=| cards=(list card)
|-
?: ?=(%2 -.old-state)
=. cards
:_ cards
(act [%watch %group-store /groups %group-on-leave])
[cards this(state old-state)]
?: ?=(%1 -.old-state)
=. cards

View File

@ -486,7 +486,7 @@
++ thread-fail
|= [=yarn =term =tang]
^- (quip card ^state)
:: %- (slog leaf+"strand {<yarn>} failed" leaf+<term> tang)
::%- (slog leaf+"strand {<yarn>} failed" leaf+<term> tang)
=/ =tid (yarn-to-tid yarn)
=/ fail-cards (thread-say-fail tid term tang)
=^ cards state (thread-clean yarn)

View File

@ -80,15 +80,18 @@
[%remove g.i.entries m.i.entries]
:: archive graph associated with group
::
=/ app-resource (de-path-soft:res app-path.m.i.entries)
?~ app-resource
loop(entries t.entries)
;< ~ bind:m
%+ raw-poke
[our.bowl %graph-store]
:- %graph-update
!> ^- update:gra
[%0 now.bowl [%archive-graph (de-path:res app-path.m.i.entries)]]
[%0 now.bowl [%archive-graph u.app-resource]]
;< ~ bind:m
%+ raw-poke
[our.bowl %graph-pull-hook]
:- %pull-hook-action
!>([%remove (de-path:res app-path.m.i.entries)])
!>([%remove u.app-resource])
loop(entries t.entries)