diff options
-rwxr-xr-x | bin/reproducible_db_maintenance.py | 8 | ||||
-rwxr-xr-x | bin/reproducible_html_breakages.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py index 649d13dd..7d88befd 100755 --- a/bin/reproducible_db_maintenance.py +++ b/bin/reproducible_db_maintenance.py @@ -593,12 +593,12 @@ schema_updates = { ], 30: [ # Add new table to track diffoscope breake - "CREATE TABLE stats_breakage - (datum TEXT NOT NULL, + '''CREATE TABLE stats_breakages + (datum TEXT, diffoscope_timeouts INTEGER, diffoscope_crashes INTEGER, - PRIMARY KEY (datum))", - "INSERT INTO rb_schema (version, date) VALUES (30, '" + now + "')" + PRIMARY KEY (datum))''', + '''INSERT INTO rb_schema (version, date) VALUES (30, '" + now + "')''' ], } diff --git a/bin/reproducible_html_breakages.py b/bin/reproducible_html_breakages.py index 90ce256b..4023c98d 100755 --- a/bin/reproducible_html_breakages.py +++ b/bin/reproducible_html_breakages.py @@ -311,13 +311,13 @@ def create_breakages_graph(): y_label, '1920', '960']) -def update_stats_breakage(diffoscope_timeouts, diffoscope_crashes): +def update_stats_breakages(diffoscope_timeouts, diffoscope_crashes): # we only do stats up until yesterday YESTERDAY = (datetime.now()-timedelta(days=1)).strftime('%Y-%m-%d') result = query_db(""" SELECT datum, diffoscope_timeouts, diffoscope_crashes - FROM stats_breakage + FROM stats_breakages WHERE datum = '{date}' """.format(date=YESTERDAY)) @@ -326,10 +326,10 @@ def update_stats_breakage(diffoscope_timeouts, diffoscope_crashes): insert = "INSERT INTO stats_breakages VALUES ('{date}', " + \ "'{diffoscope_timeouts}', '{diffoscope_crashes}')" query_db(insert.format(date=YESTERDAY, diffoscope_timeouts=diffoscope_timeouts, diffoscope_crashes=diffoscope_crashes)) - log.info("Updating db table stats_breakage on %s with %s timeouts and %s crashes.", + log.info("Updating db table stats_breakages on %s with %s timeouts and %s crashes.", YESTERDAY, diffoscope_timeouts, diffoscope_crashes) else: - log.debug("Not updating db table stats_breakage as it already has data for %s.", + log.debug("Not updating db table stats_breakages as it already has data for %s.", YESTERDAY) |