mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Reduce log level of noisy process lock logs
This commit is contained in:
parent
7b18919564
commit
215db8cab3
1 changed files with 3 additions and 3 deletions
|
@ -447,7 +447,7 @@ class ProcessLockAdapters:
|
|||
def run_with_lock(func: Callable, operation: ProcessLock.Operation, max_duration_in_seconds: int = 600, **kwargs):
|
||||
# Exit early if process lock is already taken
|
||||
if ProcessLockAdapters.is_process_locked(operation):
|
||||
logger.info(f"🔒 Skip executing {func} as {operation} lock is already taken")
|
||||
logger.debug(f"🔒 Skip executing {func} as {operation} lock is already taken")
|
||||
return
|
||||
|
||||
success = False
|
||||
|
@ -462,7 +462,7 @@ class ProcessLockAdapters:
|
|||
func(**kwargs)
|
||||
success = True
|
||||
except IntegrityError as e:
|
||||
logger.error(f"⚠️ Unable to create the process lock for {func} with {operation}: {e}")
|
||||
logger.debug(f"⚠️ Unable to create the process lock for {func} with {operation}: {e}")
|
||||
success = False
|
||||
except Exception as e:
|
||||
logger.error(f"🚨 Error executing {func} with {operation} process lock: {e}", exc_info=True)
|
||||
|
@ -475,7 +475,7 @@ class ProcessLockAdapters:
|
|||
f"🔓 Unlocked {operation} process after executing {func} {'Succeeded' if success else 'Failed'}"
|
||||
)
|
||||
else:
|
||||
logger.info(f"Skip removing {operation} process lock as it was not set")
|
||||
logger.debug(f"Skip removing {operation} process lock as it was not set")
|
||||
|
||||
|
||||
def run_with_process_lock(*args, **kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue