From 105dbf49e41d103e2e976311b36e7986ae5cacd2 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Wed, 17 Apr 2024 13:00:18 +0530 Subject: [PATCH] Fix max_duration_in_seconds for the update_embeddings job --- src/khoj/configure.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/khoj/configure.py b/src/khoj/configure.py index 2cb3c613..419bf950 100644 --- a/src/khoj/configure.py +++ b/src/khoj/configure.py @@ -320,7 +320,9 @@ def update_content_index(): @schedule.repeat(schedule.every(22).to(25).hours) def update_content_index_regularly(): - ProcessLockAdapters.run_with_lock(update_content_index, ProcessLock.Operation.UPDATE_EMBEDDINGS) + ProcessLockAdapters.run_with_lock( + update_content_index, ProcessLock.Operation.UPDATE_EMBEDDINGS, max_duration_in_seconds=60 * 60 * 2 + ) def configure_search_types():