Skip to content

Commit

Permalink
fix 捕获异常
Browse files Browse the repository at this point in the history
  • Loading branch information
mouday committed Aug 2, 2023
1 parent dd1f22f commit 83a14b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion domain_admin/service/async_task_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ def sync_task_decorator(task_name):
def outer_wrapper(func):
@wraps(func)
def wrapper(*args, **kwargs):
current_user_id = g.user_id

current_user_id = 0

try:
current_user_id = g.user_id
except Exception as e:
pass

# before
async_task_row = AsyncTaskModel.create(
Expand Down

0 comments on commit 83a14b1

Please sign in to comment.