Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
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
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
Workers
Base Worker
Commits
9b2c2752
Commit
9b2c2752
authored
3 years ago
by
Valentin Rigal
Committed by
Bastien Abadie
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Avoid updating activity to error when we could not fetch the element
parent
ef3a9565
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex_worker/worker/__init__.py
+4
-6
4 additions, 6 deletions
arkindex_worker/worker/__init__.py
with
4 additions
and
6 deletions
arkindex_worker/worker/__init__.py
+
4
−
6
View file @
9b2c2752
...
...
@@ -151,11 +151,8 @@ class ElementsWorker(
self
.
update_activity
(
element
.
id
,
ActivityState
.
Processed
)
except
Exception
as
e
:
failed
+=
1
element_id
=
(
element
.
id
if
isinstance
(
element
,
(
Element
,
CachedElement
))
else
item
)
# Handle the case where we failed retrieving the element
element_id
=
element
.
id
if
element
else
item
if
isinstance
(
e
,
ErrorResponse
):
message
=
f
"
An API error occurred while processing element
{
element_id
}
:
{
e
.
title
}
-
{
e
.
content
}
"
...
...
@@ -166,7 +163,8 @@ class ElementsWorker(
message
,
exc_info
=
e
if
self
.
args
.
verbose
else
None
,
)
self
.
update_activity
(
element_id
,
ActivityState
.
Error
)
if
element
:
self
.
update_activity
(
element
.
id
,
ActivityState
.
Error
)
self
.
report
.
error
(
element_id
,
e
)
# Save report as local artifact
...
...
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