mirror of
https://github.com/norohind/jubilant-system-core.git
synced 2026-10-22 14:52:09 +03:00
HookSystem._last_records don't print exception on first try
This commit is contained in:
1 file changed
+9
@@ -1,5 +1,7 @@
|
||||
import os
|
||||
import functools
|
||||
import sqlite3
|
||||
|
||||
from Hook import Hook
|
||||
import importlib.machinery
|
||||
import HookUtils
|
||||
@@ -27,6 +29,13 @@ def _last_records(operation_id: int, limit: int) -> list[dict]:
|
||||
{'limit': limit, 'operation_id': operation_id}
|
||||
).fetchall()
|
||||
|
||||
except sqlite3.DatabaseError as e:
|
||||
if retry != 0:
|
||||
logger.opt(exception=True).warning(f'Exception in {threading.current_thread().name}, retry: {retry}')
|
||||
|
||||
last_exception = e
|
||||
continue
|
||||
|
||||
except Exception as e:
|
||||
logger.opt(exception=True).warning(f'Exception in {threading.current_thread().name}, retry: {retry}')
|
||||
last_exception = e
|
||||
|
||||
Reference in new issue
Block a user