manager: ignore FileNotFoundError during user import run (#86086)
gitea/authentic/pipeline/head This commit looks good Details

This commit is contained in:
Benjamin Dauvergne 2024-02-05 15:37:37 +01:00
parent d50622cb81
commit 4a7cf5c296
1 changed files with 5 additions and 1 deletions

View File

@ -214,7 +214,7 @@ class Report:
with self.data_update as data:
data['progress'] = '%s, %d%%' % (status, round((line / total) * 100))
def thread_worker():
def _run():
from authentic2.csv_import import UserCsvImporter
with self.user_import.import_file as fd:
@ -256,6 +256,10 @@ class Report:
data['importer'] = importer
data['duration'] = duration
def thread_worker():
with contextlib.suppress(FileNotFoundError):
_run()
t = threading.Thread(target=thread_worker)
t.daemon = True
if start: