Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
cc68e387
Commit
cc68e387
authored
Dec 20, 2023
by
BO ZHANG
🏀
Browse files
set n_try to 5 for default
parent
3c417809
Pipeline
#2610
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_common/utils/_retry.py
View file @
cc68e387
...
...
@@ -9,7 +9,11 @@ Modified-History:
"""
def
retry
(
func
,
n_try
=
3
,
*
args
,
**
kwargs
):
def
retry
(
func
,
*
args
,
**
kwargs
):
if
"n_try"
in
kwargs
.
keys
():
n_try
=
kwargs
.
pop
(
"n_try"
)
else
:
n_try
=
5
# is DFS?
try
:
assert
func
.
__self__
.
__class__
.
__module__
.
startswith
(
"csst_dfs_api"
),
func
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment