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
936933f0
Commit
936933f0
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[backend] Fix scheduling routines for detecting KILL state
parent
5f5c0a3e
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/schedule.py
+3
-3
3 additions, 3 deletions
beat/web/backend/schedule.py
with
3 additions
and
3 deletions
beat/web/backend/schedule.py
+
3
−
3
View file @
936933f0
...
...
@@ -434,7 +434,7 @@ def work(environments, cpulimit, process, django_settings):
is started locally and the process ID stored with the split.
Job split cancelling is executed by setting the split state as
``
CANCELLED
`` and waiting for this function to handle it.
``
KILL
`` and waiting for this function to handle it.
Parameters:
...
...
@@ -459,7 +459,7 @@ def work(environments, cpulimit, process, django_settings):
# cancel job splits
for
j
in
JobSplit
.
objects
.
select_for_update
().
filter
(
worker
=
worker
,
status
=
Job
.
CANCELLED
,
end_date__isnull
=
True
,
process_id__isnull
=
False
):
status
=
Job
.
KILL
,
end_date__isnull
=
True
,
process_id__isnull
=
False
):
signal
.
signal
(
signal
.
SIGKILL
,
j
.
process_id
)
j
.
end
(
None
,
Job
.
CANCELLED
)
...
...
@@ -561,7 +561,7 @@ def worker_shutdown():
# cancel job splits which are running
for
j
in
JobSplit
.
objects
.
select_for_update
().
filter
(
worker
=
worker
,
status
=
(
Job
.
CANCELLED
,
Job
.
PROCESSING
),
end_date__isnull
=
True
,
status
=
(
Job
.
KILL
,
Job
.
PROCESSING
),
end_date__isnull
=
True
,
process_id__isnull
=
False
):
signal
.
signal
(
signal
.
SIGKILL
,
j
.
process_id
)
j
.
end
(
Result
(
status
=
1
,
usrerr
=
message
))
...
...
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