Проект аудита отелей: основные скрипты и документация
- Краулеры: smart_crawler.py, regional_crawler.py - Аудит: audit_orel_to_excel.py, audit_chukotka_to_excel.py - РКН проверка: check_rkn_registry.py, recheck_unclear_rkn.py - Отчёты: create_orel_horizontal_report.py - Обработка: process_all_hotels_embeddings.py - Документация: README.md, DB_SCHEMA_REFERENCE.md
This commit is contained in:
43
quick_check.py
Normal file
43
quick_check.py
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
os.chdir('/root/engine/public_oversight/hotels')
|
||||
|
||||
# Проверяем процессы
|
||||
result = subprocess.run(['ps', 'aux'], capture_output=True, text=True, timeout=5)
|
||||
print("🔍 ПРОЦЕССЫ КРАУЛЕРА:")
|
||||
for line in result.stdout.split('\n'):
|
||||
if 'mass_crawler.py' in line and 'grep' not in line:
|
||||
parts = line.split()
|
||||
print(f"\n✅ PID: {parts[1]}")
|
||||
print(f" CPU: {parts[2]}%")
|
||||
print(f" RAM: {parts[3]}%")
|
||||
print(f" Команда: {' '.join(parts[10:])}")
|
||||
|
||||
# Проверяем последний лог
|
||||
import glob
|
||||
from datetime import datetime
|
||||
|
||||
logs = sorted(glob.glob('mass_crawler_*.log'), key=os.path.getmtime, reverse=True)
|
||||
if logs:
|
||||
latest = logs[0]
|
||||
mtime = datetime.fromtimestamp(os.path.getmtime(latest)).strftime('%H:%M:%S')
|
||||
size = os.path.getsize(latest)
|
||||
|
||||
print(f"\n📄 ПОСЛЕДНИЙ ЛОГ: {latest}")
|
||||
print(f" Изменён: {mtime}")
|
||||
print(f" Размер: {size:,} байт")
|
||||
|
||||
# Последние 10 строк
|
||||
with open(latest, 'r') as f:
|
||||
lines = f.readlines()
|
||||
print(f"\n📋 ПОСЛЕДНИЕ СТРОКИ ({len(lines)} всего):")
|
||||
for line in lines[-10:]:
|
||||
if line.strip():
|
||||
print(f" {line.rstrip()}")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user