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
c4aeb762
Commit
c4aeb762
authored
8 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[backend Improve block skipping strategy
parent
f41c33e2
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
+16
-6
16 additions, 6 deletions
beat/web/backend/models.py
with
16 additions
and
6 deletions
beat/web/backend/models.py
+
16
−
6
View file @
c4aeb762
...
...
@@ -548,13 +548,23 @@ class Job(models.Model):
# lock self - avoids concurrent update from scheduler/worker subsystem
Job
.
objects
.
select_for_update
().
filter
(
pk
=
self
.
pk
)
# checks for the presence of output caches - if they exist
, skip
# and update related blocks
# checks for the presence of output caches - if they exist
and
#
checksum, skip
and update related blocks
if
all
([
k
.
exists
()
for
k
in
self
.
block
.
outputs
.
all
()]):
self
.
status
=
Job
.
SKIPPED
self
.
_cascade_updates
()
#to similar blocks
self
.
save
()
return
if
all
([
k
.
index_checksums
()
for
k
in
self
.
block
.
outputs
.
all
()]):
self
.
status
=
Job
.
SKIPPED
self
.
split_errors
=
0
self
.
end_date
=
datetime
.
datetime
.
now
()
self
.
save
()
self
.
_cascade_updates
()
#to similar blocks
self
.
block
.
_update_state
()
return
else
:
logger
.
warning
(
"
Trying to make block `%s
'
runnable, but
"
\
"
indexes do not checksum - waiting...
"
,
self
.
block
)
self
.
split_errors
+=
1
self
.
save
()
return
# else, flag it as runnable
self
.
runnable_date
=
datetime
.
datetime
.
now
()
...
...
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