mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 23:44:56 +03:00
kiln: always check local desk when adjusting dudes
We do not care about what's on foreign, the local desk is the thing we're taking action on. This is more robust in the face of absent information about foreign desks etc. Also stops pretending to take-commet during take-merge-main. We'll get a separate commit event.
This commit is contained in:
parent
18bad9c423
commit
18701b2ad2
@ -747,7 +747,7 @@
|
||||
=? vats liv.rein.rak
|
||||
%- stop-dudes
|
||||
=< idle
|
||||
(adjust-dudes [our loc now] `[ship desk aeon]:ral rein.rak)
|
||||
(adjust-dudes [our loc now] rein.rak)
|
||||
=. rail.rak `%*(. ral aeon +(aeon:ral))
|
||||
|^ ^+ vats
|
||||
?: =(%base loc)
|
||||
@ -851,7 +851,7 @@
|
||||
%- (slog leaf/- p.p.syn)
|
||||
=. vats (emit (diff:give %merge-fail loc rak p.p.syn))
|
||||
vats
|
||||
=. vats take-commit
|
||||
~> %slog.(fmt "merge into {<loc>} succeeded")
|
||||
?. =(%base loc)
|
||||
vats
|
||||
~> %slog.(fmt "merging %base into %kids at {<kel>}")
|
||||
@ -895,8 +895,7 @@
|
||||
++ update-running-dudes
|
||||
^+ vats
|
||||
=/ local [our loc now]
|
||||
=/ upstream ?~(rail.rak ~ `[ship desk aeon]:u.rail.rak)
|
||||
=/ dif (adjust-dudes local upstream rein.rak)
|
||||
=/ dif (adjust-dudes local rein.rak)
|
||||
=. vats (start-dudes jolt.dif)
|
||||
=. vats (stop-dudes idle.dif)
|
||||
vats
|
||||
|
@ -130,12 +130,14 @@
|
||||
++ read-bill-foreign
|
||||
|= [=ship =desk =aeon]
|
||||
^- (list dude)
|
||||
~| +<
|
||||
=/ her (scot %p ship)
|
||||
=/ syd (scot %tas desk)
|
||||
=/ yon (scot %ud aeon)
|
||||
::
|
||||
=/ dom .^(dome cv/~[her syd yon])
|
||||
=/ tak (scot %uv (~(got by hit.dom) aeon))
|
||||
=/ tak ~| aeons=~(key by hit.dom)
|
||||
(scot %uv (~(got by hit.dom) aeon))
|
||||
=/ yak .^(yaki cs/~[her syd yon %yaki tak])
|
||||
=/ fil (~(get by q.yak) /desk/bill)
|
||||
?~ fil ~
|
||||
@ -150,7 +152,7 @@
|
||||
:: +read-bill: read contents of /desk/bill manifest
|
||||
::
|
||||
++ read-bill
|
||||
|= [our=ship =desk now=@da]
|
||||
|= [our=ship =desk now=@da]
|
||||
=/ pax (en-beam [our desk da+now] /desk/bill)
|
||||
?. (~(has in .^((set ^desk) cd/~[(scot %p our) ~ (scot %da now)])) desk)
|
||||
*(list dude)
|
||||
@ -165,16 +167,11 @@
|
||||
::
|
||||
++ adjust-dudes
|
||||
|= $: local=[our=ship =desk now=@da]
|
||||
upstream=(unit [=ship =desk =aeon])
|
||||
=rein
|
||||
==
|
||||
^- [jolt=(list dude) idle=(list dude)]
|
||||
=/ all=(list dude)
|
||||
?~ upstream
|
||||
(read-bill local)
|
||||
?: =(ship.u.upstream our.local)
|
||||
(read-bill local(desk desk.u.upstream))
|
||||
(read-bill-foreign u.upstream)
|
||||
(read-bill local)
|
||||
=/ want (get-apps-want all rein)
|
||||
=/ have (get-apps-live local)
|
||||
[want (skip have ~(has in (sy want)))]
|
||||
|
Loading…
Reference in New Issue
Block a user