Files
service-finder/backend/app/test_outside/rontgen_felkesz_adatok.py
2026-03-13 10:22:41 +00:00

38 lines
1.3 KiB
Python
Executable File

# /app/app/test_outside/rontgen_felkesz_adatok.py
import asyncio
from sqlalchemy import text
from app.database import AsyncSessionLocal
async def show_halfway():
async with AsyncSessionLocal() as db:
# Lekérdezzük a Hunter által már feldolgozott (ACTIVE) rekordokat
res = await db.execute(text('''
SELECT make, marketing_name, engine_capacity, power_kw, fuel_type, priority_score
FROM vehicle.vehicle_model_definitions
WHERE status = 'ACTIVE'
ORDER BY updated_at DESC
LIMIT 15
'''))
rows = res.fetchall()
print('\n' + '🔍 FÉLKÉSZ ADATOK (A Hunter robot zsákmánya) 🔍'.center(60))
print('=' * 60)
if not rows:
print('Nincsenek aktív járművek a köztes táblában.')
return
for r in rows:
make, model, ccm, kw, fuel, prio = r
ccm_txt = f"{ccm} ccm" if ccm else "?"
kw_txt = f"{kw} kW" if kw else "?"
print(f"🚗 {make} {model} (Prio: {prio or 0})")
print(f" ⚙️ Motor RDW adat: {ccm_txt} | {kw_txt} | ⛽ {fuel or '?'}")
print('-' * 60)
if __name__ == "__main__":
asyncio.run(show_halfway())
# docker exec -it sf_api python /app/app/test_outside/rontgen_felkesz_adatok.py