mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 08:32:39 +03:00
pull-hook: resume sub-ahead
This commit is contained in:
parent
46eea8f3d4
commit
1832ce1d60
@ -226,35 +226,44 @@
|
|||||||
=^ og-cards pull-hook
|
=^ og-cards pull-hook
|
||||||
(on-load:og inner-state.old)
|
(on-load:og inner-state.old)
|
||||||
=. state old
|
=. state old
|
||||||
=^ retry-cards state
|
=^ [restart-cards=(list card) hook=_pull-hook] state
|
||||||
retry-failed-kicks
|
restart-subs
|
||||||
|
=. pull-hook hook
|
||||||
:_ this
|
:_ this
|
||||||
:(weld cards og-cards retry-cards)
|
:(weld cards og-cards restart-cards)
|
||||||
%2 !!
|
::
|
||||||
::
|
%2 $(old (state-to-3 old))
|
||||||
%1 $(old [%2 +.old ~])
|
%1 $(old [%2 +.old ~])
|
||||||
::
|
%0 !! :: pre-breach
|
||||||
%0
|
|
||||||
%_ $
|
|
||||||
-.old %1
|
|
||||||
::
|
|
||||||
:: cards
|
|
||||||
:: (weld cards (missing-subscriptions tracking.old))
|
|
||||||
==
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ retry-failed-kicks
|
++ state-to-3
|
||||||
|
|= old=state-2
|
||||||
|
%* . *state-3
|
||||||
|
tracking (tracking-to-3 tracking.old)
|
||||||
|
inner-state inner-state.old
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ tracking-to-3
|
||||||
|
|= trk=(map resource ship)
|
||||||
|
%- ~(gas by *(map resource track))
|
||||||
|
%+ turn ~(tap by trk)
|
||||||
|
|= [=resource =ship]
|
||||||
|
:- resource
|
||||||
|
[ship %active ~]
|
||||||
|
::
|
||||||
|
++ restart-subs
|
||||||
=| acc-cards=(list card)
|
=| acc-cards=(list card)
|
||||||
=/ fail=(list resource)
|
=/ subs=(list resource)
|
||||||
~(tap in ~(key by tracking))
|
~(tap in ~(key by tracking))
|
||||||
|- ^- (quip card _state)
|
|- ^- [[(list card) _pull-hook] _state]
|
||||||
?~ fail
|
?~ subs
|
||||||
[acc-cards state]
|
[[acc-cards pull-hook] state]
|
||||||
=* rid i.fail
|
=* rid i.subs
|
||||||
=^ [crds=(list card) hook=_pull-hook] state
|
=^ [crds=(list card) hook=_pull-hook] state
|
||||||
tr-abet:tr-restart-if-failed:(tr-abed:track-engine:hc rid)
|
tr-abet:tr-restart-on-load:(tr-abed:track-engine:hc rid)
|
||||||
=. pull-hook hook
|
=. pull-hook hook
|
||||||
$(fail t.fail, acc-cards (weld acc-cards crds))
|
$(subs t.subs, acc-cards (weld acc-cards crds))
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
++ on-save
|
++ on-save
|
||||||
@ -471,10 +480,12 @@
|
|||||||
|= ver=@ud
|
|= ver=@ud
|
||||||
tr-core(status [%sub-ver ver])
|
tr-core(status [%sub-ver ver])
|
||||||
::
|
::
|
||||||
++ tr-restart-if-failed
|
++ tr-restart-on-load
|
||||||
?. ?=(%failed-kick -.status)
|
?: ?=(%failed-kick -.status)
|
||||||
tr-core
|
tr-restart
|
||||||
tr-restart
|
?: &(?=(%sub-ver -.status) =(min-version.config ver.status))
|
||||||
|
tr-restart
|
||||||
|
tr-core
|
||||||
::
|
::
|
||||||
++ tr-restart
|
++ tr-restart
|
||||||
=. status [%active ~]
|
=. status [%active ~]
|
||||||
@ -566,9 +577,7 @@
|
|||||||
++ leave-version
|
++ leave-version
|
||||||
|= =ship
|
|= =ship
|
||||||
(~(leave pass version-wir) [ship push-hook-name.config])
|
(~(leave pass version-wir) [ship push-hook-name.config])
|
||||||
|
::
|
||||||
|
|
||||||
|
|
||||||
++ poke-sane
|
++ poke-sane
|
||||||
^- (quip card:agent:gall _state)
|
^- (quip card:agent:gall _state)
|
||||||
=/ cards
|
=/ cards
|
||||||
|
Loading…
Reference in New Issue
Block a user