mirror of
https://github.com/omg-xtao/ytdlbot.git
synced 2025-01-30 17:58:36 +00:00
parent
d714252fc5
commit
47c324e905
3
.gitignore
vendored
3
.gitignore
vendored
@ -158,4 +158,5 @@ env/*
|
|||||||
ytdlbot/ytdl.session
|
ytdlbot/ytdl.session
|
||||||
data/*
|
data/*
|
||||||
upgrade_worker.sh
|
upgrade_worker.sh
|
||||||
ytdl.session
|
ytdl.session
|
||||||
|
reinforcement/*
|
@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
__author__ = "Benny <benny.think@gmail.com>"
|
__author__ = "Benny <benny.think@gmail.com>"
|
||||||
|
|
||||||
|
import contextlib
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import signal
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
@ -107,8 +107,9 @@ def current_time(ts=None):
|
|||||||
|
|
||||||
|
|
||||||
def get_revision():
|
def get_revision():
|
||||||
revision = subprocess.check_output("git -C ../ rev-parse --short HEAD".split()).decode("u8").replace("\n", "")
|
with contextlib.suppress(subprocess.SubprocessError):
|
||||||
return revision
|
return subprocess.check_output("git -C ../ rev-parse --short HEAD".split()).decode("u8").replace("\n", "")
|
||||||
|
return "unknown"
|
||||||
|
|
||||||
|
|
||||||
def get_func_queue(func) -> int:
|
def get_func_queue(func) -> int:
|
||||||
|
Loading…
Reference in New Issue
Block a user