add extra error logging and take from migration channel#89
Conversation
| error-ch ([e] | ||
| (throw e)) | ||
| (log/info :migrate/sid "start" (util/current-time-iso) "." ledgers force) | ||
| (try |
There was a problem hiding this comment.
This try will never catch anything. The return value of async/<!! could be an exception, but won't be a thrown exception.
You'll need to check the return value, and if an exception then throw it for this try to actually catch it (which is what the go-try macro does). But at that point you don't need the try.
If the main purpose of the throw statements below is to exit the loop, I think you simply make util/exception? checks you do below not call recur.
Not sure if there is anything to catch an exception upstream, but if so you'll need to either do what I describe above or use go-try.
There was a problem hiding this comment.
Thanks for catching that, I was trying to get this up for Jake quickly last week and I changed it from a go-try to a go-loop while doing build debugging. I've put it back to the way it was.
6a52c9d to
f16e79d
Compare
Add extra logging for failures and add a take from the migration channel.