mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 12:51:51 +03:00
lull, ames: add %wham to cancel all scry requests
(we might want to add permissioning to restrict who can send %whams)
This commit is contained in:
parent
55dffb59e7
commit
d406344081
9
pkg/arvo/gen/hood/wham.hoon
Normal file
9
pkg/arvo/gen/hood/wham.hoon
Normal file
@ -0,0 +1,9 @@
|
||||
:- %say
|
||||
|= [^ [=ship pax=$@(~ [=path ~])] ~]
|
||||
=/ =path
|
||||
:: XX remove default path
|
||||
?~ pax /c/x/1/kids/sys/kelvin
|
||||
?> ?=([@ *] path.pax)
|
||||
=, pax
|
||||
path
|
||||
[%helm-pass %a %wham ship path]
|
@ -1,9 +1,9 @@
|
||||
:- %say
|
||||
|= [^ [=ship all=? pax=$@(~ [=path ~])] ~]
|
||||
|= [^ [=ship pax=$@(~ [=path ~])] ~]
|
||||
=/ =path
|
||||
:: XX remove default path
|
||||
?~ pax /c/x/1/kids/sys/kelvin
|
||||
?> ?=([@ *] path.pax)
|
||||
=, pax
|
||||
path
|
||||
[%helm-pass %a %yawn ship path all]
|
||||
[%helm-pass %a %yawn ship path]
|
||||
|
@ -1078,6 +1078,7 @@
|
||||
:: %keen: data request from arvo
|
||||
:: %pine: scries for the latest case of a path
|
||||
:: %yawn: cancel request from arvo
|
||||
:: %wham: cancels all scry request from any vane
|
||||
::
|
||||
:: System and Lifecycle Tasks
|
||||
::
|
||||
@ -1102,7 +1103,8 @@
|
||||
::
|
||||
[%keen =ship =path]
|
||||
[%pine =ship =path]
|
||||
[%yawn =ship =path all=?]
|
||||
[%yawn =ship =path]
|
||||
[%wham =ship =path]
|
||||
::
|
||||
$>(%born vane-task)
|
||||
$>(%init vane-task)
|
||||
|
@ -2277,11 +2277,11 @@
|
||||
|= todos=alien-agenda
|
||||
todos(keens (~(put ju keens.todos) path duct))
|
||||
::
|
||||
++ on-yawn
|
||||
|= [=ship =path all=?]
|
||||
++ on-cancel-scry
|
||||
|= [all=? =ship =path]
|
||||
^+ event-core
|
||||
?~ ship-state=(~(get by peers.ames-state) ship)
|
||||
~|(%no-ship-for-yawn !!)
|
||||
~|(%cancel-scry-missing^ship^path !!)
|
||||
?> ?=([%known *] u.ship-state)
|
||||
fi-abet:ke-abet:(ke-unsub:(ke-abed:ke:fi:(abed:pe ship) path) duct all)
|
||||
::
|
||||
@ -4335,7 +4335,8 @@
|
||||
::
|
||||
%pine (on-pine:event-core +.task)
|
||||
%keen (on-keen:event-core +.task)
|
||||
%yawn (on-yawn:event-core +.task)
|
||||
%yawn (on-cancel-scry:event-core | +.task)
|
||||
%wham (on-cancel-scry:event-core & +.task)
|
||||
==
|
||||
::
|
||||
[moves ames-gate]
|
||||
|
@ -3245,7 +3245,7 @@
|
||||
=* bus u.busy.sat
|
||||
=/ =wire (request-wire kind.bus her syd u.nux)
|
||||
~& %cancel-request-yawn
|
||||
:~ [hen %pass wire %a %yawn her path.bus |]
|
||||
:~ [hen %pass wire %a %yawn her path.bus]
|
||||
[hen %pass wire %b %rest time.bus]
|
||||
==
|
||||
::
|
||||
@ -3291,7 +3291,7 @@
|
||||
%- emil
|
||||
~& %retry-with-ames-yawn
|
||||
:~ [hen %pass wire %b %rest time.bus]
|
||||
[hen %pass wire %a %yawn her path.bus |]
|
||||
[hen %pass wire %a %yawn her path.bus]
|
||||
==
|
||||
:: re-send over ames
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user