PDF link target=_blank + nginx timeouts + priority filteri (samo s podacima)
nginx (sport.rinet.one): - proxy_read_timeout 60s → 300s - proxy_send_timeout 300s - proxy_buffering off (PDF stream) - client_max_body_size 50M → 100M Endpoints: - /api/v2/klubovi/financirani: +with_data filter (samo s potporama/godišnjakom/HNS) - /api/v2/sportasi/filtered: +samo_priority +samo_s_hns Frontend: - PDF link target=_blank rel=noopener - window._klub_only_priority = true (default) - window._sportas_only_priority = true (default) DB View: - pgz_sport.v_nogomet_priority (prima_potpore, u_godisnjaku, ima_hns_roster)
This commit is contained in:
@@ -57,9 +57,9 @@ def main():
|
||||
|
||||
# Source 1: pgz_sport.dokumenti (tekst column)
|
||||
cur.execute("""
|
||||
SELECT klub_id, naziv_dokumenta, COALESCE(tekst, '') AS tekst
|
||||
SELECT id, COALESCE(title, '') AS title, COALESCE(sadrzaj, '') AS tekst
|
||||
FROM pgz_sport.dokumenti
|
||||
WHERE COALESCE(tekst, '') != '' AND length(tekst) > 200
|
||||
WHERE COALESCE(sadrzaj, '') != '' AND length(sadrzaj) > 200
|
||||
""")
|
||||
docs = cur.fetchall()
|
||||
print(f"Documents to scan: {len(docs)}")
|
||||
@@ -71,7 +71,7 @@ def main():
|
||||
found = extract_trainers_from_text(d.get("tekst", ""))
|
||||
for name, cnt in found.items():
|
||||
all_trainers[name] += cnt
|
||||
trainer_clubs.setdefault(name, set()).add(d.get("klub_id"))
|
||||
trainer_clubs.setdefault(name, set()).add(d.get("id"))
|
||||
|
||||
print(f"Unique trainer names found: {len(all_trainers)}")
|
||||
print(f"Top 20 by mentions:")
|
||||
|
||||
Reference in New Issue
Block a user