-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mm: light refactoring. more logging #2776
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, definitely cleaner.
if err := f(); err != nil { | ||
return err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the update function fails, this will be in a weird state, because the waitgroup
returned from Connect
will still not be done. The only way to get the bot to run again is to do another update. You won't be able to start it. I think resuming with the old config would be fine, and if the restart fails, then kill the unifiedExchangeAdaptor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted to just shut the whole thing down if there is an error updating config.
client/mm/mm_basic.go
Outdated
// Process book updates | ||
wg.Add(1) | ||
m.wg.Add(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the bots are using the waitgroup of the exchange adaptor, the Disconnect
call in withPause
never returns.
unifiedExchangeAdaptor
, which reduces duplication and enables sharing of utilities and more concise access to immutable properties.unifiedExchangeAdaptor