ames: refactor unused on-pine flow for publishers

This commit is contained in:
yosoyubik 2023-04-04 08:28:43 +02:00
parent 920c208a60
commit 06a1f9aa27

View File

@ -1712,21 +1712,19 @@
:: if it's %cork plea passed to ames from its sink, :: if it's %cork plea passed to ames from its sink,
:: give %done and process flow closing after +on-take-done call :: give %done and process flow closing after +on-take-done call
:: ::
?: =([%a /close ~] plea) ?: =([%a /close ~] plea) (emit duct %give %done ~)
(emit duct %give %done ~)
:: ::
?: &(=(/pine path.plea) =(our her:;;(balk payload.plea))) ?: =([%a /cone *] plea)
:: XX TODO move to |^ :: sent to ourselves from ha-plea, after sinking a remote /pine plea
::
=+ ;;(blk=balk payload.plea) =+ ;;(blk=balk payload.plea)
?> =(%c van.blk) ?> &(=(our her.blk) =(%c van.blk) ?=(^ spr.blk))
=. car.blk %w =+ nom=(en-roof:balk blk(car %w, cas da/now, spr `path`~[i.spr.blk]))
=. cas.blk da+now ::
=. spr.blk =. event-core (emit duct %give %done ~)
?> ?=(^ spr.blk) ?+ cage=(rof ~ nom) !!
^-(path ~[i.spr.blk]) [~ ~] (emit duct %give %miss (en-path:balk blk))
=+ !<(=cass:clay q:(need (need (rof ~ (en-roof:balk blk))))) [~ ~ *] =+(!<(c=cass:clay q.u.u.cage) (emit duct %give %boon ud:c))
=~ (emit duct %give %boon ud.cass)
(emit duct %give %done ~)
== ==
:: .plea is from local vane to foreign ship :: .plea is from local vane to foreign ship
:: ::
@ -2246,26 +2244,13 @@
++ on-pine ++ on-pine
|= [=ship =path] |= [=ship =path]
^+ event-core ^+ event-core
?. =(our ship) ?< =(our ship)
?~ ship-state=(~(get by peers.ames-state) ship) ?^ ship-state=(~(get by peers.ames-state) ship)
%+ enqueue-alien-todo ship
|= todos=alien-agenda
todos(pines (~(put ju pines.todos) path duct))
?> ?=([%known *] u.ship-state) ?> ?=([%known *] u.ship-state)
fi-abet:(on-pine:fi:(abed-peer:pe ship +.u.ship-state) path duct) fi-abet:(on-pine:fi:(abed-peer:pe ship +.u.ship-state) path duct)
:: XX: crashing correct behaviour? %+ enqueue-alien-todo ship
=+ blk=(need (de-part:balk our rift.ames-state life.ames-state path)) |= todos=alien-agenda
?> ?=(%c van.blk) todos(pines (~(put ju pines.todos) path duct))
=+ nom=(en-roof:balk blk(car %w, cas [%da now]))
=+ cag=(rof ~ nom)
?- cag
~ !!
[~ ~] (emit duct %give %miss (en-path:balk blk))
::
[~ ~ *]
=+ !<(=cass:clay q.u.u.cag)
(emit duct %give %boon `*`ud.cass)
==
:: ::
++ on-keen ++ on-keen
|= [=ship =path] |= [=ship =path]
@ -3661,7 +3646,7 @@
%j (pe-emit duct %pass wire %j %plea her plea) %j (pe-emit duct %pass wire %j %plea her plea)
== ==
?: ?=(%pine -.path.plea) ?: ?=(%pine -.path.plea)
(pe-emit duct %pass wire %a %plea our plea) (pe-emit duct %pass wire %a %plea our plea(path /cone))
:: a %cork plea is handled using %$ as the recipient vane to :: a %cork plea is handled using %$ as the recipient vane to
:: account for publishers that still handle ames-to-ames %pleas :: account for publishers that still handle ames-to-ames %pleas
:: ::