From df3fb78baddf42517283f4cb2c06d42ad87be05e Mon Sep 17 00:00:00 2001 From: David Brochart Date: Fri, 25 Nov 2022 15:52:30 +0100 Subject: [PATCH] Disable TTL by default --- tests/test_ystore.py | 1 + ypy_websocket/ystore.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_ystore.py b/tests/test_ystore.py index a669d47..901f39d 100644 --- a/tests/test_ystore.py +++ b/tests/test_ystore.py @@ -31,6 +31,7 @@ class MyTempFileYStore(TempFileYStore): class MySQLiteYStore(SQLiteYStore): db_path = MY_SQLITE_YSTORE_DB_PATH + document_ttl = 1000 def __init__(self, *args, delete_db=False, **kwargs): if delete_db: diff --git a/ypy_websocket/ystore.py b/ypy_websocket/ystore.py index 374f534..57eeaba 100644 --- a/ypy_websocket/ystore.py +++ b/ypy_websocket/ystore.py @@ -168,7 +168,7 @@ class MySQLiteYStore(SQLiteYStore): # Determines the "time to live" for all documents, i.e. how recent the # latest update of a document must be before purging document history. # Defaults to 1 day. - document_ttl: int = 24 * 60 * 60 + document_ttl: float = float("inf") path: str db_initialized: asyncio.Task