mirror of
https://github.com/urbit/shrub.git
synced 2025-01-01 17:16:47 +03:00
gen: +desk-requests, counts pending clay requests
Gives a summation of pending clay requests for a given desk, specifying the number of local and incoming-from-foreign requests, and for the latter, how many of those are awaiting the next revision of a desk (read: are currently |sync-ing from the desk).
This commit is contained in:
parent
50cfdb0f2a
commit
6b80aec3c2
28
pkg/arvo/gen/desk-requests.hoon
Normal file
28
pkg/arvo/gen/desk-requests.hoon
Normal file
@ -0,0 +1,28 @@
|
||||
:: +desk-requests: count pending requests for a desk
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[=desk ~]
|
||||
~
|
||||
==
|
||||
:- %tang
|
||||
^- tang
|
||||
=/ cul=(list [@p rave:clay])
|
||||
%~ tap in
|
||||
.^ (set [@p rave:clay])
|
||||
/cx/(scot %p p.bec)//(scot %da now)/cult/[desk]
|
||||
==
|
||||
::
|
||||
=/ [loc=_cul inc=_cul]
|
||||
(skid cul |=([=@p rave:clay] =(p p.bec)))
|
||||
=/ syc=_cul
|
||||
=/ nex=@ud
|
||||
+(ud:.^(cass:clay %cw /(scot %p p.bec)/[desk]/(scot %da now)))
|
||||
(skim inc |=([@p =rave:clay] =([%sing %w ud+nex /] rave)))
|
||||
::
|
||||
%- flop
|
||||
:~ leaf+"total: {<(lent cul)>}"
|
||||
leaf+"- local: {<(lent loc)>}"
|
||||
leaf+"- incoming: {<(lent inc)>}"
|
||||
leaf+" - for next: {<(lent syc)>}"
|
||||
==
|
Loading…
Reference in New Issue
Block a user