Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
job_controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
videoag
job_controller
Commits
fd481eb0
Verified
Commit
fd481eb0
authored
9 months ago
by
Dorian Koch
Browse files
Options
Downloads
Patches
Plain Diff
Do not delete jobs manually
parent
aeefd324
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/job_controller_config.py
+0
-5
0 additions, 5 deletions
config/job_controller_config.py
src/jobs/wrapped_job.py
+0
-4
0 additions, 4 deletions
src/jobs/wrapped_job.py
with
0 additions
and
9 deletions
config/job_controller_config.py
+
0
−
5
View file @
fd481eb0
...
@@ -11,8 +11,3 @@ POSTGRES = {
...
@@ -11,8 +11,3 @@ POSTGRES = {
"
database
"
:
"
videoag
"
"
database
"
:
"
videoag
"
}
}
'''
'''
# Whether to immediately delete jobs after they have been processed
# Ideally everything that is needed will be extracted from the job and stored in the database, so this should be set to True
DELETE_JOBS_AFTER_SUCCESS
=
True
DELETE_JOBS_AFTER_FAILURE
=
False
This diff is collapsed.
Click to expand it.
src/jobs/wrapped_job.py
+
0
−
4
View file @
fd481eb0
...
@@ -49,13 +49,9 @@ class WrappedJob(Event):
...
@@ -49,13 +49,9 @@ class WrappedJob(Event):
if
self
.
job_state
==
JobState
.
FINISHED
:
if
self
.
job_state
==
JobState
.
FINISHED
:
self
.
success
(
cstate
)
self
.
success
(
cstate
)
self
.
jobData
.
update_state
(
cstate
,
JobState
.
FINISHED_AND_PROCESSED
)
self
.
jobData
.
update_state
(
cstate
,
JobState
.
FINISHED_AND_PROCESSED
)
if
cstate
.
config
.
get
(
"
DELETE_JOBS_AFTER_SUCCESS
"
,
True
):
cstate
.
k8s
.
delete_job_by_id
(
self
.
job_id
)
elif
self
.
job_state
==
JobState
.
FAILED
:
elif
self
.
job_state
==
JobState
.
FAILED
:
self
.
failure
(
cstate
)
self
.
failure
(
cstate
)
self
.
jobData
.
update_state
(
cstate
,
JobState
.
FAILED_AND_PROCESSED
)
self
.
jobData
.
update_state
(
cstate
,
JobState
.
FAILED_AND_PROCESSED
)
if
cstate
.
config
.
get
(
"
DELETE_JOBS_AFTER_FAILURE
"
,
True
):
cstate
.
k8s
.
delete_job_by_id
(
self
.
job_id
)
else
:
else
:
raise
Exception
(
f
"
Job is in unexpected state:
{
self
.
job_state
}
"
)
raise
Exception
(
f
"
Job is in unexpected state:
{
self
.
job_state
}
"
)
...
...
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