Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
nomad-FAIR
Commits
6630bdc0
Commit
6630bdc0
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Added retry limit.
parent
c14b5703
No related branches found
No related tags found
1 merge request
!36
Migration, merge 0.4.3 with parsers
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/coe_repo/upload.py
+6
-2
6 additions, 2 deletions
nomad/coe_repo/upload.py
with
6 additions
and
2 deletions
nomad/coe_repo/upload.py
+
6
−
2
View file @
6630bdc0
...
...
@@ -129,6 +129,7 @@ class Upload(Base): # type: ignore
logger
=
utils
.
get_logger
(
__name__
,
upload_id
=
upload
.
upload_id
)
last_error
=
None
retries
=
0
while
True
:
publish_filelock
=
filelock
.
FileLock
(
...
...
@@ -189,9 +190,12 @@ class Upload(Base): # type: ignore
return
upload_id
except
Exception
as
e
:
repo_db
.
rollback
()
if
last_error
!=
str
(
e
):
if
last_error
!=
str
(
e
)
and
retries
<
3
:
last_error
=
str
(
e
)
logger
.
error
(
'
Retry publish after unexpected execption.
'
,
exc_info
=
e
)
logger
.
error
(
'
Retry publish after unexpected exception.
'
,
exc_info
=
e
,
error
=
last_error
,
retry
=
retries
)
retries
+=
1
else
:
logger
.
error
(
'
Unexpected exception.
'
,
exc_info
=
e
)
raise
e
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment