Spaces:
Running
Running
Update watcher.py
Browse files- watcher.py +3 -3
watcher.py
CHANGED
|
@@ -209,11 +209,11 @@ def merge_video_on_server(video_url, audio_url, video_id, quality, video_title,
|
|
| 209 |
monitor_url = result["data"]["result"]["monitor"]["http"]
|
| 210 |
|
| 211 |
# 完了するまでポーリング
|
| 212 |
-
max_attempts =
|
| 213 |
attempt = 0
|
| 214 |
|
| 215 |
while attempt < max_attempts:
|
| 216 |
-
time.sleep(
|
| 217 |
|
| 218 |
status_res = requests.get(monitor_url, timeout=30)
|
| 219 |
status_res.raise_for_status()
|
|
@@ -368,7 +368,7 @@ def main():
|
|
| 368 |
except Exception as e:
|
| 369 |
print(f"結合処理エラー: {e}")
|
| 370 |
message_lines.append(f"結合処理に失敗: {str(e)}")
|
| 371 |
-
message_lines.append(f"ダウンロードが完了しました。\
|
| 372 |
# メッセージを送信
|
| 373 |
message = "\n".join(message_lines)
|
| 374 |
send_to_channel(message)
|
|
|
|
| 209 |
monitor_url = result["data"]["result"]["monitor"]["http"]
|
| 210 |
|
| 211 |
# 完了するまでポーリング
|
| 212 |
+
max_attempts = 6 # 最大60回試行(30秒間隔で約30分)
|
| 213 |
attempt = 0
|
| 214 |
|
| 215 |
while attempt < max_attempts:
|
| 216 |
+
time.sleep(40) # 30秒間隔でチェック
|
| 217 |
|
| 218 |
status_res = requests.get(monitor_url, timeout=30)
|
| 219 |
status_res.raise_for_status()
|
|
|
|
| 368 |
except Exception as e:
|
| 369 |
print(f"結合処理エラー: {e}")
|
| 370 |
message_lines.append(f"結合処理に失敗: {str(e)}")
|
| 371 |
+
message_lines.append(f"ダウンロードが完了しました。\nダウンロードに失敗してる場合はIzuemon(MOCA)を呼んでください。")
|
| 372 |
# メッセージを送信
|
| 373 |
message = "\n".join(message_lines)
|
| 374 |
send_to_channel(message)
|