Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
beat
beat.web
Commits
a71e4097
Commit
a71e4097
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[backend] Fix to job updates with parent jobs
parent
67f34f27
No related branches found
No related tags found
1 merge request
!194
Scheduler
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/web/backend/models.py
+22
-18
22 additions, 18 deletions
beat/web/backend/models.py
with
22 additions
and
18 deletions
beat/web/backend/models.py
+
22
−
18
View file @
a71e4097
...
@@ -680,31 +680,35 @@ class Job(models.Model):
...
@@ -680,31 +680,35 @@ class Job(models.Model):
if
self
.
done
():
return
if
self
.
done
():
return
split_statuses
=
self
.
splits
.
values_list
(
'
status
'
,
flat
=
True
)
# If this process has a parent, then don't try to get split statuses
if
not
self
.
parent
:
if
self
.
start_date
is
None
:
split_statuses
=
self
.
splits
.
values_list
(
'
status
'
,
flat
=
True
)
self
.
start_date
=
\
self
.
splits
.
order_by
(
'
start_date
'
).
first
().
start_date
# Process main status and status from job results
if
self
.
start_date
is
None
:
if
Job
.
FAILED
in
split_statuses
:
self
.
start_date
=
\
self
.
status
=
Job
.
FAILED
self
.
splits
.
order_by
(
'
start_date
'
).
first
().
start_date
elif
Job
.
CANCELLED
in
split_statuses
:
# Process main status and status from job results
self
.
status
=
Job
.
CANCELLED
if
Job
.
FAILED
in
split_statuses
:
self
.
status
=
Job
.
FAILED
elif
(
Job
.
PROCESSING
in
split_statuses
)
or
\
elif
Job
.
CANCELLED
in
split_statuses
:
(
Job
.
QUEUED
in
split_statuses
and
Job
.
COMPLETED
in
split_statuses
):
self
.
status
=
Job
.
CANCELLED
self
.
status
=
Job
.
PROCESSING
elif
all
([
s
==
Job
.
SKIPPED
for
s
in
split_statuses
]):
elif
(
Job
.
PROCESSING
in
split_statuses
)
or
\
self
.
status
=
Job
.
SKIPPED
(
Job
.
QUEUED
in
split_statuses
and
\
Job
.
COMPLETED
in
split_statuses
):
self
.
status
=
Job
.
PROCESSING
elif
Job
.
QUEUED
not
in
split_statuses
:
elif
all
([
s
==
Job
.
SKIPPED
for
s
in
split_statuses
])
:
self
.
status
=
Job
.
COMPLET
ED
self
.
status
=
Job
.
SKIPP
ED
else
:
elif
Job
.
QUEUED
not
in
split_statuses
:
self
.
status
=
Job
.
QUEUED
self
.
status
=
Job
.
COMPLETED
else
:
self
.
status
=
Job
.
QUEUED
# if required, erase dangling files, update own results
# if required, erase dangling files, update own results
timings
=
None
timings
=
None
...
...
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