Skip to content

Commit

Permalink
🔖 Update to v1.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Mar 18, 2024
1 parent e49471a commit 020dc1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pagermaid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import pyromod.listen
from pyrogram import Client

pgm_version = "1.4.12"
pgm_version_code = 1412
pgm_version = "1.4.13"
pgm_version_code = 1413
CMD_LIST = {}
module_dir = __path__[0]
working_dir = getcwd()
Expand Down
6 changes: 3 additions & 3 deletions pagermaid/modules/reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ async def clear_read_context_cron():

@scheduler.scheduled_job("interval", seconds=10, id="reload.ping_watchdog")
async def ping_task():
if not bot.is_initialized:
if not bot.session.is_started.is_set():
logs.debug("Ping task bot not started, skip")
return
if ping_watchdog_event.is_set():
logs.debug("Ping task watchdog event set, skip")
Expand All @@ -46,8 +47,7 @@ async def ping_task():
logs.debug("Ping task raise OSError, try restart")
ping_watchdog_event.set()
try:
await bot.restart()
await reload_all()
await bot.session.restart()
finally:
ping_watchdog_event.clear()
logs.debug("Ping task ok")

0 comments on commit 020dc1c

Please sign in to comment.