Browse Source

重试方法获取原函数名

xueyiming 1 week ago
parent
commit
83c26f7244
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ad/pai_flow_operator2.py

+ 2 - 0
ad/pai_flow_operator2.py

@@ -1,4 +1,5 @@
 # -*- coding: utf-8 -*-
+import functools
 import os
 import re
 import sys
@@ -36,6 +37,7 @@ MAX_RETRIES = 3
 
 
 def retry(func):
+    @functools.wraps(func)
     def wrapper(*args, **kwargs):
         retries = 0
         while retries < MAX_RETRIES: