Skip to content

Commit

Permalink
small correction in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
obervinov committed Feb 11, 2025
1 parent e74a7a0 commit 1db7dea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def create_users(self, rate_limits):
"""
return Users(vault=self.vault, rate_limits=rate_limits, storage_connection=self.database.get_connection())

def reset_users(self):
def reset_instances(self):
"""
Resets the instances of the Users module.
For handling the exception when the database connection is lost.
Expand Down Expand Up @@ -528,7 +528,7 @@ def main():
tg.launch_bot()
# Workaround for https://github.com/obervinov/pyinstabot-downloader/issues/118
except database.error:
user_manager.reset_users()
user_manager.reset_instances()
except TelegramExceptions.FailedToCreateInstance as telegram_api_exception:
log.error('[Bot]: main thread failed, restart thread: %s', telegram_api_exception)
time.sleep(5)
Expand Down

0 comments on commit 1db7dea

Please sign in to comment.