diff --git a/src/ctf_gameserver/controller/database.py b/src/ctf_gameserver/controller/database.py index 239ce06..e97624a 100644 --- a/src/ctf_gameserver/controller/database.py +++ b/src/ctf_gameserver/controller/database.py @@ -27,7 +27,7 @@ def get_control_info(db_conn, prohibit_changes=False): def increase_tick(db_conn, prohibit_changes=False): with transaction_cursor(db_conn, prohibit_changes) as cursor: - cursor.execute('UPDATE scoring_gamecontrol SET current_tick = current_tick + 1, cancel_checks = 0') + cursor.execute('UPDATE scoring_gamecontrol SET current_tick = current_tick + 1, cancel_checks = false') # Create flags for every service and team in the new tick cursor.execute('INSERT INTO scoring_flag (service_id, protecting_team_id, tick)' ' SELECT service.id, team.user_id, control.current_tick' @@ -39,7 +39,7 @@ def increase_tick(db_conn, prohibit_changes=False): def cancel_checks(db_conn, prohibit_changes=False): with transaction_cursor(db_conn, prohibit_changes) as cursor: - cursor.execute('UPDATE scoring_gamecontrol SET cancel_checks = 1') + cursor.execute('UPDATE scoring_gamecontrol SET cancel_checks = true') def update_scoring(db_conn): diff --git a/tests/checker/test_integration.py b/tests/checker/test_integration.py index 36757ff..1493af6 100644 --- a/tests/checker/test_integration.py +++ b/tests/checker/test_integration.py @@ -274,7 +274,7 @@ def test_cancel_checks(self, monotonic_mock, warning_mock): os.kill(checkerscript_pid, 0) with transaction_cursor(self.connection) as cursor: - cursor.execute('UPDATE scoring_gamecontrol SET cancel_checks=1') + cursor.execute('UPDATE scoring_gamecontrol SET cancel_checks=true') master_loop.supervisor.queue_timeout = 0.01 monotonic_mock.return_value = 190 diff --git a/tests/controller/test_main_loop.py b/tests/controller/test_main_loop.py index 273ff72..9657cf3 100644 --- a/tests/controller/test_main_loop.py +++ b/tests/controller/test_main_loop.py @@ -108,7 +108,7 @@ def test_next_tick_overdue(self, sleep_mock, _): with transaction_cursor(self.connection) as cursor: cursor.execute('UPDATE scoring_gamecontrol SET start=datetime("now", "-19 minutes"), ' ' end=datetime("now", "+1421 minutes"), ' - ' current_tick=5, cancel_checks=1') + ' current_tick=5, cancel_checks=true') controller.main_loop_step(self.connection, self.metrics, False)