Import Pipeline

Pull teams, players, and fixtures from API-Football. All null stats default to 0. Partial data (≥ 4 null fields) is flagged with data_quality = 'partial'.

Full Squad & Fixture Import

Imports all teams → players → fixtures in sequence.

Import Match Stats

Pull per-player stats for a finished fixture by API-Football fixture ID.

Calculate Votes

Run the voto statistico engine on finished, unprocessed matches. Leave match ID blank to process all pending matches.


Automation Pipeline

These run automatically via cron every 5 / 10 minutes. Use the buttons below to trigger them manually if needed.

Sync Today's Fixtures

Fetches today's + yesterday's WC matches from API-Football and updates wc_matches and wc_match_results. Keeps the tournament page fresh.

Process Finished Matches

For every unprocessed FT/PEN match: imports player stats → calculates votes → syncs fantasy scores to all active league matchdays → auto-calculates results when the matchday window closes.

Link Player API IDs

Fetches full WC 2026 squad lists from API Football for every team and matches players by name. Updates api_football_id, image_url, position, and role_fanta for all matched players.

Sync Player Photos

For every player with an api_football_id, sets their photo from the API Football CDN. Only updates players with a missing or SofaScore photo.

Sync Player Positions

Update position and role_fanta for all players (G→GK, D→DEF, M→MID, F→FWD). Enter a fixture ID to sync one match, or leave blank to sync all matches in wc_matches.

Deduplicate Players

Finds English-nationality duplicate stubs created by auto-import (e.g. "Mexico" vs "Messico") and merges them into the canonical Italian-nationality records. Reassigns all stats and votes, then deletes the duplicates. Safe to run multiple times.

Dona con PayPal Telegram Instagram