Skip to content

Commit

Permalink
Merge pull request anasty17#1626 from R4ndomUsers/master
Browse files Browse the repository at this point in the history
Forgot
  • Loading branch information
anasty17 committed Nov 23, 2023
2 parents b3f0775 + d0acdfd commit 583825b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def restart(_, message):
if Interval:
for intvl in list(Interval.values()):
intvl.cancel()
await sync_to_async(clean_all)
await clean_all()
proc1 = await create_subprocess_exec(
"pkill", "-9", "-f", "gunicorn|aria2c|qbittorrent-nox|ffmpeg|rclone"
)
Expand Down
4 changes: 2 additions & 2 deletions bot/helper/ext_utils/files_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from .exceptions import NotSupportedExtractionArchive
from bot import aria2, LOGGER, DOWNLOAD_DIR, get_client, GLOBAL_EXTENSION_FILTER
from bot.helper.ext_utils.bot_utils import sync_to_async, cmd_exec
from bot.helper.ext_utils.bot_utils import sync_to_async, async_to_sync, cmd_exec

ARCH_EXT = [
".tar.bz2",
Expand Down Expand Up @@ -102,7 +102,7 @@ async def clean_all():
def exit_clean_up(signal, frame):
try:
LOGGER.info("Please wait, while we clean up and stop the running downloads")
clean_all()
async_to_sync(clean_all)
srun(["pkill", "-9", "-f", "gunicorn|aria2c|qbittorrent-nox|ffmpeg"])
sexit(0)
except KeyboardInterrupt:
Expand Down

0 comments on commit 583825b

Please sign in to comment.