Allow enabling of webhook
This commit is contained in:
parent
3ca161f196
commit
144d308e5e
@ -19,8 +19,7 @@ from freqtrade.analyze import Analyze
|
|||||||
from freqtrade.exchange import Exchange
|
from freqtrade.exchange import Exchange
|
||||||
from freqtrade.fiat_convert import CryptoToFiatConverter
|
from freqtrade.fiat_convert import CryptoToFiatConverter
|
||||||
from freqtrade.persistence import Trade
|
from freqtrade.persistence import Trade
|
||||||
from freqtrade.rpc import RPCMessageType
|
from freqtrade.rpc import RPCManager, RPCMessageType
|
||||||
from freqtrade.rpc import RPCManager
|
|
||||||
from freqtrade.state import State
|
from freqtrade.state import State
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -23,6 +23,12 @@ class RPCManager(object):
|
|||||||
from freqtrade.rpc.telegram import Telegram
|
from freqtrade.rpc.telegram import Telegram
|
||||||
self.registered_modules.append(Telegram(freqtrade))
|
self.registered_modules.append(Telegram(freqtrade))
|
||||||
|
|
||||||
|
# Enable Webhook
|
||||||
|
if freqtrade.config.get('webhook', {}).get('enabled', False):
|
||||||
|
logger.info('Enabling rpc.webhook...')
|
||||||
|
from freqtrade.rpc.webhook import Webhook
|
||||||
|
self.registered_modules.append(Webhook(freqtrade))
|
||||||
|
|
||||||
def cleanup(self) -> None:
|
def cleanup(self) -> None:
|
||||||
""" Stops all enabled rpc modules """
|
""" Stops all enabled rpc modules """
|
||||||
logger.info('Cleaning up rpc modules ...')
|
logger.info('Cleaning up rpc modules ...')
|
||||||
|
Loading…
Reference in New Issue
Block a user