mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 00:13:12 +03:00
gall: force load %hood and %dojo on poke
This commit is contained in:
parent
cd10e02b73
commit
ac072729c2
@ -917,8 +917,23 @@
|
||||
=/ running (~(get by yokes.state) agent)
|
||||
=/ is-running ?~(running %| ?=(%& -.agent.u.running))
|
||||
=/ is-blocked (~(has by blocked.state) agent)
|
||||
:: agent is running; deliver move normally
|
||||
::
|
||||
?. |(!is-running is-blocked)
|
||||
(mo-apply agent routes deal)
|
||||
:: %hood or %dojo must run; wake them up
|
||||
::
|
||||
?: ?=(?(%hood %dojo) agent-name)
|
||||
~> %slog.2^leaf/"gall: force load {<agent-name>}"
|
||||
=/ bek=beak [our q.beak.yoke da+now]
|
||||
=/ rag (mo-scry-agent-cage agent-name q.bek da+now)
|
||||
?: ?=(%| -.rag)
|
||||
~> %slog.2^leaf/"gall: force load {<agent-name>} failed"
|
||||
(mean p.rag)
|
||||
=. mo-core (mo-receive-core:cor dap bek p.rag)
|
||||
~> %slog.2^leaf/"gall: force load {<agent-name>} succeeded"
|
||||
(mo-apply agent routes deal)
|
||||
::
|
||||
?: |(!is-running is-blocked)
|
||||
=/ blocked=(qeu blocked-move)
|
||||
=/ waiting (~(get by blocked.state) agent)
|
||||
=/ deals (fall waiting *(qeu blocked-move))
|
||||
@ -929,7 +944,6 @@
|
||||
%_ mo-core
|
||||
blocked.state (~(put by blocked.state) agent blocked)
|
||||
==
|
||||
(mo-apply agent routes deal)
|
||||
:: +mo-handle-ames-request: handle %ames request message.
|
||||
::
|
||||
++ mo-handle-ames-request
|
||||
|
Loading…
Reference in New Issue
Block a user