From 1f0456d08b894c40d745f4e6f15b581f16e5503b Mon Sep 17 00:00:00 2001 From: fang Date: Fri, 28 Jul 2023 21:05:03 +0200 Subject: [PATCH] bark: correctly handle save-summary thread results We weren't accounting for the different wire used for this, causing us to spill our spaghetti and redirect processing to +on-fail, which wasn't very graceful. Now, we can actually properly notify on failed thread runs. --- desk/app/bark.hoon | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/desk/app/bark.hoon b/desk/app/bark.hoon index 56a4d9d..edd0328 100644 --- a/desk/app/bark.hoon +++ b/desk/app/bark.hoon @@ -39,12 +39,20 @@ ++ on-arvo |= [=wire sign=sign-arvo] ^- (quip card _this) - ?> =(/fetch wire) - ?> ?=(%wake +<.sign) - =^ caz this (on-poke %bark-generate-summaries !>(~)) - :_ this - :_ caz - [%pass /fetch %arvo %b %wait (next-timer now.bowl)] + ?+ wire ~|([%strange-wire wire] !!) + [%fetch ~] + ?> ?=(%wake +<.sign) + =^ caz this (on-poke %bark-generate-summaries !>(~)) + :_ this + :_ caz + [%pass /fetch %arvo %b %wait (next-timer now.bowl)] + :: + [%save-summary @ @ ~] + ?> ?=(%arow +<.sign) + ?: ?=(%& -.p.sign) [~ this] + %- (slog 'bark: failed to save summary' p.p.sign) + [~ this] + == :: ++ on-poke |= [=mark =vase]