move _should_stop from module global to class variable

This commit is contained in:
Janne Sinivirta
2017-08-30 21:19:14 +03:00
parent 28c65af134
commit ace556e3bf
2 changed files with 25 additions and 24 deletions

View File

@@ -174,10 +174,10 @@ class TelegramHandler(object):
:param update: message update
:return: None
"""
from main import get_instance, stop_instance
from main import get_instance
if get_instance().is_alive():
TelegramHandler.send_msg('`Stopping trader ...`', bot=bot)
stop_instance()
get_instance().stop()
else:
TelegramHandler.send_msg('*Status:* `already stopped`', bot=bot)