Fork me on GitHub
#missionary
<
2023-01-13
>
alex19:01:42

Which library does the error {"message": "Sleep cancelled"} come from? I couldn't find it directly in Missionary's source In one of our flows, we dispatch a sleep to invoke something in 30 seconds. If we invoke sleep, then cancel the flow, the flow's error handler receives the above JS object. I'm not sure I would consider this an error, so I wanted to find the code and get some more context on the design/implementation

Dustin Getz19:01:13

it's in .java file, track it down from m/sleep

Dustin Getz19:01:12

you can catch and discard this error – what's happening is, in response to the cancellation request, the sleep throws an exception as it's terminal value which is propagated per process supervision to propagate the termination to siblings and parents etc

Dustin Getz19:01:28

m/watch and other continous flows have the same behavior

alex19:01:20

thank you! i appreciate the level of detail. for our use case, i think we'll just catch and discard this error as we expect this to happen when intentionally cancelling the flow

👍 2
xificurC20:01:13

why doesn't (m/? (m/reduce conj (m/zip vector (m/seed [1 2 3]) (m/seed (repeat nil))))) terminate?

leonoel20:01:27

looks like a bug

xificurC20:01:03

using (fn [ac nx] (prn :nx nx) (conj ac nx)) as reducer it prints

:nx [1 nil]
:nx [2 nil]

xificurC20:01:26

then it burns a CPU

😄 2