mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 15:34:10 +03:00
ames: fix |close-flows generator
This commit is contained in:
parent
1e04e9498e
commit
1d8214530a
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:55f1bcccf861b3a2247aabb6ec3349829272ef8c36cfc8a16ff0930aac87a24d
|
||||
size 5748196
|
||||
oid sha256:511564074c56329460e238ebb4881ff4dd9d642ac6d0804bbd9aaa17adc2f8ee
|
||||
size 5732943
|
||||
|
@ -1,12 +1,9 @@
|
||||
:: |close-flows: corks all stale ames flows
|
||||
::
|
||||
:: It runs in dry mode by default, printing the flows that can be closed:
|
||||
::
|
||||
:: |close-flows, =dry |
|
||||
:: It runs in dry mode by default, printing the flows that can be closed.
|
||||
:: To actually close the flows, run with |close-flows, =dry |
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[arg=~ dry=?]
|
||||
==
|
||||
|= [^ [dry=?]]
|
||||
::
|
||||
[%helm-kroc dry]
|
||||
|
@ -247,10 +247,7 @@
|
||||
::
|
||||
++ poke-kroc
|
||||
|= dry=? =< abet
|
||||
%- emil ^- (list card)
|
||||
:~ [%pass /helm/kroc %arvo %a %kroc dry]
|
||||
[%pass /helm/rake %arvo %g %rake ~ %r dry]
|
||||
==
|
||||
(emit [%pass /helm/kroc %arvo %a %kroc dry])
|
||||
::
|
||||
++ poke-knob
|
||||
|= [error-tag=@tas level=?(%hush %soft %loud)] =< abet
|
||||
|
@ -1931,19 +1931,22 @@
|
||||
=< q.q %- need %- need
|
||||
(rof ~ %gf `beam`[[our %$ da+now] /])
|
||||
::
|
||||
=/ subs=(jar path [bone nonce=@])
|
||||
=/ subs=(jar path [bone sub-nonce=@])
|
||||
%+ roll ~(tap by snd.peer-state)
|
||||
|= [[=bone *] subs=(jar path [bone nonce=@])]
|
||||
|= [[=bone *] subs=(jar path [bone sub-nonce=@])]
|
||||
?~ duct=(~(get by by-bone.ossuary.peer-state) bone) subs
|
||||
?. ?=([* [%gall %use sub=@ @ %out @ @ nonce=@ pub=@ *] *] u.duct)
|
||||
subs
|
||||
=/ nonce=@ (rash i.t.t.t.t.t.t.t.i.t.u.duct dem)
|
||||
=/ =wire i.t.u.duct
|
||||
=/ nonce=(unit @) (rush i.t.t.t.t.t.t.t.i.t.u.duct dem)
|
||||
%- ~(add ja subs)
|
||||
:_ [bone ?~(nonce 0 u.nonce)] :: 0 for old pre-nonce subscriptions
|
||||
?~ nonce wire
|
||||
:: don't include the sub-nonce in the key
|
||||
::
|
||||
(~(add ja subs) (weld (scag 7 wire) (slag 8 wire)) [bone nonce])
|
||||
(weld (scag 7 wire) (slag 8 wire))
|
||||
%+ roll ~(tap by subs)
|
||||
|= [[=wire flows=(list [bone @])] core=_core]
|
||||
|= [[=wire flows=(list [bone sub-nonce=@])] core=_core]
|
||||
::
|
||||
%+ roll flows
|
||||
|= [[=bone sub-nonce=@] core=_core]
|
||||
@ -1954,13 +1957,11 @@
|
||||
=/ log=tape "[bone={<bone>} nonce={<sub-nonce>} agent={<app>}] {<path>}"
|
||||
=; corkable=?
|
||||
?.(corkable core (%*(on-cork core cork-bone `bone) ship))
|
||||
:: check if the current subscription also failed
|
||||
::
|
||||
?. =(sub-nonce nonce)
|
||||
?: &((gth sub-nonce 0) (lth sub-nonce nonce))
|
||||
%. !dry
|
||||
(trace |(dry odd.veb) ship |.((weld "stale %watch plea " log)))
|
||||
:: we can safely cork the current subscription
|
||||
:: if it received a nack on backward bone
|
||||
:: if it received a nack on a backward bone
|
||||
::
|
||||
=+ target=(mix 0b10 bone)
|
||||
:: not a naxplanation ack bone
|
||||
|
Loading…
Reference in New Issue
Block a user