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