mirror of
https://github.com/norohind/jubilant-system-core.git
synced 2025-04-17 03:32:19 +03:00
HookSystem._last_records don't print exception on first try
This commit is contained in:
parent
5027ef748c
commit
fea8380529
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user