spider: clean serving threads

This commit is contained in:
ryjm 2021-09-27 22:09:35 -04:00
parent 7fd9e6fcaa
commit bf534ffe71

View File

@ -403,9 +403,7 @@
:: ::
=: starting.state (~(put by starting.state) yarn [%build vase]) =: starting.state (~(put by starting.state) yarn [%build vase])
tid.state (~(put by tid.state) new-tid yarn) tid.state (~(put by tid.state) new-tid yarn)
serving.state serving.state (~(put by serving.state) new-tid [~ %noun q.beak])
?. (~(has by serving.state) new-tid) serving.state
(~(put by serving.state) new-tid [~ %noun q.beak])
== ==
=/ pax=path =/ pax=path
~| no-file-for-thread+file ~| no-file-for-thread+file
@ -539,7 +537,7 @@
:_ state(serving (~(del by serving.state) tid)) :_ state(serving (~(del by serving.state) tid))
?~ eyre-id ?~ eyre-id
%- (slog leaf+"spider got input for non-existent eyre-id in thread {<tid>}" ~) %- (slog leaf+"spider got input for non-existent eyre-id in thread {<tid>}" ~)
`state ~
%+ give-simple-payload:app:server u.eyre-id %+ give-simple-payload:app:server u.eyre-id
^- simple-payload:http ^- simple-payload:http
:_ ~ :_ ~ :_ ~ :_ ~
@ -605,7 +603,7 @@
=/ =tid (yarn-to-tid yarn) =/ =tid (yarn-to-tid yarn)
=: running.state (del-yarn running.state yarn) =: running.state (del-yarn running.state yarn)
tid.state (~(del by tid.state) tid) tid.state (~(del by tid.state) tid)
serving.state (~(del by serving.state) yarn) serving.state (~(del by serving.state) (yarn-to-tid yarn))
== ==
:_ state :_ state
%+ murn ~(tap by wex.bowl) %+ murn ~(tap by wex.bowl)
@ -650,15 +648,12 @@
:: ::
++ yarn-to-byk ++ yarn-to-byk
|= [=yarn =bowl:gall] |= [=yarn =bowl:gall]
^- beak
=/ tid (yarn-to-tid yarn) =/ [* * =desk]
=/ byk ~| "no desk associated with {<tid>}"
%+ bind %- ~(got by serving.state) (yarn-to-tid yarn)
(~(get by serving.state) tid) =/ boc bec
|= [* * =desk] boc(q desk)
=/ boc bec
boc(q desk)
?~ byk byk.bowl u.byk
:: ::
++ clean-state ++ clean-state
!> ^- clean-slate !> ^- clean-slate