Forty-Bot / trends.tf

Team Fortress 2 Stats and Trends
https://trends.tf
Other
14 stars 2 forks source link

Handle logs with explicit quick-fix ubers #82

Closed Forty-Bot closed 2 years ago

Forty-Bot commented 2 years ago

Log 3124976 cannot be imported with the error

[2022-02-21 03:36:16,509] logs: Could not import log 3124976
Traceback (most recent call last):
  File "/srv/uwsgi/trends/venv/bin/trends_importer", line 11, in <module>
    load_entry_point('trends.tf', 'console_scripts', 'trends_importer')()
  File "/srv/uwsgi/trends/trends/importer/cli.py", line 56, in main
    args.importer(args, c)
  File "/srv/uwsgi/trends/trends/importer/logs.py", line 794, in import_logs
    import_log(cctx, c.cursor(), logid, log)
  File "/srv/uwsgi/trends/trends/importer/logs.py", line 277, in import_log
    c.execute("""INSERT INTO medic_stats (
  File "/srv/uwsgi/trends/venv/lib/python3.9/site-packages/psycopg2/extras.py", line 146, in execute
    return super().execute(query, vars)
psycopg2.errors.CheckViolation: new row for relation "medic_stats" violates check constraint "medic_stats_check1"
DETAIL:  Failing row contains (3124976, 76561198108359693, 18, 4, 3, 9, 1, 0, 0, 6.986207, 12.777778, 61.2, 7.1833334, 6, 1).

This occurs because quick-fix ubers have their own column and are not counted as "other" ubers.