tangyoha / telegram_media_downloader

基于Dineshkarthik的项目, 电报视频下载,电报资源下载,跨平台,支持web查看下载进度 ,支持bot下发指令下载,支持下载已经加入的私有群但是限制下载的资源, telegram media download,Download media files from a telegram conversation/chat/channel up to 2GiB per file
MIT License
2.04k stars 236 forks source link

[Bug]: docker部署bug #135

Open sunnyadams opened 6 months ago

sunnyadams commented 6 months ago

telegram_media_downloader version or commit

v2.2.0

What OS are you seeing the problem on?

Windows, Other Linux Distro

Python Version

No response

What happened?

A bug happened!docker部署执行后未修改config中的last_read_message_id字段值

Expected Behavior

修正上述行为

Current Behavior

docker部署执行后未修改config中的last_read_message_id字段值

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

superkeyor commented 2 months ago

Reason: media_downloader.py was not able to handle SIGTERM signal issued by docker compose down.

To fix: add the following codes to above def main

import signal
import sys
def handle_sigterm(*args):
    raise KeyboardInterrupt()
signal.signal(signal.SIGTERM, handle_sigterm)