-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Conversation
Hey! Great idea. Though unfortunately I am still afraid of the following:
Gekko has only one way of passing messaging between plugins, and that way is the event system, see here: https://gekko.wizb.it/docs/internals/events.html This PR bypasses that system completely which I don't think is the best way forward. The event system is kind of a strange beast (it's something gekko specific), but (when used properly) it comes with a few benefits:
I rather keep the "log" module for low level stuff, everything the user cares about (in case of no errors/crashes/etc) should flow through the events API. Let me know your thoughts! |
Hi Mike, I agree this PR bypasses the event system and might make things difficult to troubleshoot in the future. But what is the best way to have warning and error messages sent to plugins so the user is aware of them? You mentioned the event logger, so I probably will look into that some more. My guess is the messaging plugins (Telegram, Pushbullet, Email) have to be modified to listen to the event logger (or directly to events system)? |
It's quite easy to add a new event to Gekko, but now I am thinking about this some more I see it's not as trivial: Right now events are messages, anyone (meaning: every plugin) can listen to them but only 1 plugin can emit them. That won't work here, as I think warnings and errors can come from a number of different plugins. (It's not hard to create a special event that can be broadcasted from anywhere, but I'd like to think about a clean API design). Also note that some things you can consider an error already have their own event (which makes it easier listen to specifically those), for example: I'm not saying that is the best way perse, but if we introduce a new concept maybe we should change these ones as well so that Gekko only has 1 way to do something? As to your new feature: what kind of error messages and warnings do you want to send over telegram? |
I think tradeAborted, tradeCancelled and tradeErrored covers the errors and warnings I'm looking into for now. I will try to modify the Telegrambot plugin to see if I can get it to listen and report these errors. |
Great! Doing so should be as simple as adding the methods as found in the
docs (like `processTradeAborted`) to the telegram plugin :)
…On Sun, Jul 29, 2018 at 11:35 AM, Jack Crypto49er ***@***.***> wrote:
I think tradeAborted, tradeCancelled and tradeErrored covers the errors
and warnings I'm looking into for now. I will try to modify the Telegrambot
plugin to see if I can get it to listen and report these errors.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2378 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA7MD2UsRxByNUfjuIiugihOGeFKwUwDks5uLS2CgaJpZM4Vk4Xl>
.
--
PGP key at keybase.io/mikevanrossum
<https://keybase.io/mikevanrossum/key.asc>
|
Thanks Mike! I just submitted a new PR that uses the event system to emit trades to Telegram. |
feature
Warning and Error messages are only shown in terminal.
Warning and Error messages will be shown in Telegram and/or Pushbullet if user have them enabled.
Most of the code came from this pull request (#2103). I compartmentalize the remote log function so the remote control via Telegram can be added on top in a later pull request.