Skip to content

Commit

Permalink
wip on mqtt test bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Jan 21, 2025
1 parent 533e2c3 commit db16032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pioreactor/tests/test_mqtt_to_db_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions pioreactor/utils/sqlite_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit db16032

Please sign in to comment.