add /logs/*

This commit is contained in:
2025-11-01 11:59:09 +03:00
parent 6ffb7df0f7
commit c03443dd78
2 changed files with 7 additions and 6 deletions

View File

@@ -135,7 +135,7 @@ def start_offline_threads(season, game_id):
t.start()
CURRENT_THREADS_MODE = "offline"
print("[threads] OFFLINE threads started")
logger.info("[threads] OFFLINE threads started")
def start_live_threads(season, game_id):
@@ -232,7 +232,7 @@ def start_live_threads(season, game_id):
t.start()
CURRENT_THREADS_MODE = "live"
print("[threads] LIVE threads started")
logger.info("[threads] LIVE threads started")
def stop_live_threads():
@@ -244,7 +244,7 @@ def stop_live_threads():
for t in threads_live:
t.join(timeout=1)
threads_live = []
print("[threads] LIVE threads stopped")
logger.info("[threads] LIVE threads stopped")
def stop_offline_threads():
@@ -256,7 +256,7 @@ def stop_offline_threads():
for t in threads_offline:
t.join(timeout=1)
threads_offline = []
print("[threads] OFFLINE threads stopped")
logger.info("[threads] OFFLINE threads stopped")
# общая очередь
@@ -295,7 +295,7 @@ def get_data_from_API(
value = {"error": str(ex)}
ts = datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3]
results_q.put({"source": name, "ts": ts, "data": value})
print(f"[{ts}] name: {name}, status: {value.get('status', 'no-status')}")
logger.debug(f"[{ts}] name: {name}, status: {value.get('status', 'no-status')}")
# сколько уже заняло
elapsed = time.time() - start