Fix dashboard database initialization using temp file instead of in-memory
This commit is contained in:
@@ -109,8 +109,12 @@ def init_session_state() -> None:
|
||||
st.session_state.instruments = InstrumentFactory.create(config)
|
||||
|
||||
if "repository" not in st.session_state:
|
||||
# Create test repository (in-memory for dashboard demo)
|
||||
st.session_state.repository = SQLiteRepository(":memory:")
|
||||
# Create test repository (temporary file for dashboard demo)
|
||||
import os
|
||||
import tempfile
|
||||
tmpdir = tempfile.gettempdir()
|
||||
db_path = os.path.join(tmpdir, "py_dvt_ate_dashboard.db")
|
||||
st.session_state.repository = SQLiteRepository(db_path)
|
||||
|
||||
if "test_runner" not in st.session_state:
|
||||
st.session_state.test_runner = TestRunner(st.session_state.repository)
|
||||
|
||||
Reference in New Issue
Block a user