增加账号回报状态

This commit is contained in:
SwZ
2025-04-18 17:26:27 +08:00
parent f8c2f9ee31
commit 91b43f2b52
3 changed files with 21 additions and 9 deletions

View File

@@ -47,12 +47,12 @@ def execute_task(tid, task_type, **kwargs):
try:
result = TASK_TYPE.get(task_type)(**kwargs)
task_callback(tid, data=result)
except AuthException as e:
except (AuthException, OperationFailed) as e:
record_full_log(error_logger, e)
task_callback(tid, data={}, status='fail', msg=str(e))
task_callback(tid, data={}, status=e.error_type, msg=str(e))
except Exception as e:
record_full_log(error_logger, e)
task_callback(tid, data={}, status='fail', msg=str(e))
task_callback(tid, data={}, status='failed', msg=str(e))
def main():