Skip to content

Commit

Permalink
use kill
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Feb 9, 2022
1 parent 4186d0b commit ff3eaea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ You can choose to become 'VIP' if you really need large traffic. And also, you c
8. support sending as file or streaming as video
9. supports celery worker distribution - faster than before.
10. subscriptions to YouTube Channels
11. cache mechanism - for the same video you'll only have to download once.
11. cache mechanism - download once for the same video.

![](assets/2.jpeg)

Expand Down Expand Up @@ -128,7 +128,8 @@ you can configure all the following environment variables:
* GOOGLE_API_KEY: YouTube API key, required for YouTube video subscription.
* AUDIO_FORMAT: audio format, default is m4a. You can set to any known and supported format for ffmpeg. For
example,`mp3`, `flac`, etc. ⚠️ m4a is the fastest. Other formats may affect performance.
* ARCHIVE_ID: group or channel id/username. All downloads will send to this group first and then forward to end user.
* ARCHIVE_ID: group or channel id/username. All downloads will send to this group first and then forward to end user.
**Inline button will be lost during the forwarding.**

## 3.2 Set up init data

Expand Down
4 changes: 2 additions & 2 deletions ytdlbot/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import pathlib
import re
import subprocess
import sys
import psutil
import tempfile
import threading
import time
Expand Down Expand Up @@ -334,7 +334,7 @@ def hot_patch(*args):
subprocess.call(pull, shell=True, cwd=git_path)

logging.info("Code is updated, applying hot patch now...")
sys.exit(2)
psutil.Process().kill()


def run_celery():
Expand Down

0 comments on commit ff3eaea

Please sign in to comment.