diff --git a/desk/app/channels-server.hoon b/desk/app/channels-server.hoon index baa891617d..6149cb947c 100644 --- a/desk/app/channels-server.hoon +++ b/desk/app/channels-server.hoon @@ -1155,15 +1155,13 @@ ++ run-hooks |= [=event:h =nest:c default=cord] ^- [(each event:h tang) _cor] - =; [result=(each event:h tang) effects=(list effect:h)] - [result (run-hook-effects effects nest)] =| effects=(list effect:h) =/ order (~(gut by order.hooks) nest ~) =/ channel `[nest (~(got by v-channels) nest)] =/ =bowl:h (get-hook-bowl channel *config:h) |- ?~ order - [&+event effects] + [&+event (run-hook-effects effects nest)] =* next $(order t.order) =/ hook (~(got by hooks.hooks) i.order) =. bowl bowl(hook hook, config (~(gut by config.hook) nest ~)) @@ -1174,7 +1172,7 @@ =. effects (weld effects effects.u.return) =. hooks.hooks (~(put by hooks.hooks) i.order hook(state new-state.u.return)) ?: ?=(%denied -.result) - [|+~[(fall msg.result default)] effects] + [|+~[(fall msg.result default)] (run-hook-effects effects nest)] =. event event.result next ++ wake-hook diff --git a/desk/ted/hook/schedule.hoon b/desk/ted/hook/schedule.hoon index 246cdc710a..0c1fffb53f 100644 --- a/desk/ted/hook/schedule.hoon +++ b/desk/ted/hook/schedule.hoon @@ -25,8 +25,8 @@ (pure:m !>(~)) ;< now=time bind:m get-time:s =/ fires-at - ?^ next.schedule.response - (add now schedule.response) + ?@ schedule.response (add now schedule.response) + next.schedule.response %- (slog (crip "starting hook {}, scheduled to run on {} at {}") ~) (pure:m !>(~)) +$ action