Close sessions after telegram calls

This commit is contained in:
Matthias 2023-03-17 20:41:11 +01:00
parent d808dd49e8
commit b0a7b64d44

View File

@ -83,6 +83,8 @@ def authorized_only(command_handler: Callable[..., None]) -> Callable[..., Any]:
self._send_msg(str(e)) self._send_msg(str(e))
except BaseException: except BaseException:
logger.exception('Exception occurred within Telegram module') logger.exception('Exception occurred within Telegram module')
finally:
Trade.session.remove()
return wrapper return wrapper