From db16032fdec2337185538a7b6ca933b7aaea3e39 Mon Sep 17 00:00:00 2001 From: CamDavidsonPilon Date: Mon, 20 Jan 2025 19:57:17 -0500 Subject: [PATCH] wip on mqtt test bug --- pioreactor/tests/test_mqtt_to_db_streaming.py | 3 +++ pioreactor/utils/sqlite_worker.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pioreactor/tests/test_mqtt_to_db_streaming.py b/pioreactor/tests/test_mqtt_to_db_streaming.py index 9025faf5..a3bad26e 100644 --- a/pioreactor/tests/test_mqtt_to_db_streaming.py +++ b/pioreactor/tests/test_mqtt_to_db_streaming.py @@ -5,6 +5,8 @@ import sqlite3 from time import sleep +import pytest + import pioreactor.background_jobs.leader.mqtt_to_db_streaming as m2db from pioreactor import mureq from pioreactor import structs @@ -143,6 +145,7 @@ def test_dosing_events_land_in_db() -> None: assert len(results) == 1 +@pytest.mark.xfail(reason="we stopped adding to kalman filter table in 25.1.x release") def test_kalman_filter_entries() -> None: config["storage"]["database"] = "test.sqlite" config["od_reading.config"]["samples_per_second"] = "0.2" diff --git a/pioreactor/utils/sqlite_worker.py b/pioreactor/utils/sqlite_worker.py index 26e659c7..973346a4 100644 --- a/pioreactor/utils/sqlite_worker.py +++ b/pioreactor/utils/sqlite_worker.py @@ -61,11 +61,9 @@ def __init__(self, file_name: str, max_queue_size: int = 100, raise_on_error: bo self._sqlite3_cursor = self._sqlite3_conn.cursor() self._sqlite3_cursor.executescript( """ - PRAGMA journal_mode=WAL; PRAGMA synchronous = 1; -- aka NORMAL, recommended when using WAL PRAGMA temp_store = 2; -- stop writing small files to disk, use mem PRAGMA busy_timeout = 15000; - PRAGMA foreign_keys = ON; PRAGMA synchronous = NORMAL; PRAGMA auto_vacuum = INCREMENTAL; PRAGMA cache_size = -20000;