[ARVADOS] created: a5b84537695f43b3d0be47dc195ef4a6818053fe
git at public.curoverse.com
git at public.curoverse.com
Wed Jul 9 13:03:11 EDT 2014
at a5b84537695f43b3d0be47dc195ef4a6818053fe (commit)
commit a5b84537695f43b3d0be47dc195ef4a6818053fe
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Jul 9 12:58:31 2014 -0400
3113: Remove qsequence assignment shim. Clarify "do not load tasks
queued by a failed task" logic in crunch-job.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index ca2e8c4..a4951e7 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -985,27 +985,29 @@ sub reapchildren
push @freeslot, $proc{$pid}->{slot};
delete $proc{$pid};
- # Load new tasks
- my $newtask_list = [];
- my $newtask_results;
- do {
- $newtask_results = $arv->{'job_tasks'}->{'list'}->execute(
- 'where' => {
- 'created_by_job_task_uuid' => $Jobstep->{'arvados_task'}->{uuid}
- },
- 'order' => 'qsequence',
- 'offset' => scalar(@$newtask_list),
- );
- push(@$newtask_list, @{$newtask_results->{items}});
- } while (@{$newtask_results->{items}});
- foreach my $arvados_task (@$newtask_list) {
- my $jobstep = {
- 'level' => $arvados_task->{'sequence'},
- 'failures' => 0,
- 'arvados_task' => $arvados_task
- };
- push @jobstep, $jobstep;
- push @jobstep_todo, $#jobstep;
+ if ($task_success) {
+ # Load new tasks
+ my $newtask_list = [];
+ my $newtask_results;
+ do {
+ $newtask_results = $arv->{'job_tasks'}->{'list'}->execute(
+ 'where' => {
+ 'created_by_job_task_uuid' => $Jobstep->{'arvados_task'}->{uuid}
+ },
+ 'order' => 'qsequence',
+ 'offset' => scalar(@$newtask_list),
+ );
+ push(@$newtask_list, @{$newtask_results->{items}});
+ } while (@{$newtask_results->{items}});
+ foreach my $arvados_task (@$newtask_list) {
+ my $jobstep = {
+ 'level' => $arvados_task->{'sequence'},
+ 'failures' => 0,
+ 'arvados_task' => $arvados_task
+ };
+ push @jobstep, $jobstep;
+ push @jobstep_todo, $#jobstep;
+ }
}
$progress_is_dirty = 1;
diff --git a/services/api/app/models/job_task.rb b/services/api/app/models/job_task.rb
index d5d2edd..89328de 100644
--- a/services/api/app/models/job_task.rb
+++ b/services/api/app/models/job_task.rb
@@ -4,7 +4,6 @@ class JobTask < ArvadosModel
include CommonApiTemplate
serialize :parameters, Hash
after_update :delete_created_job_tasks_if_failed
- after_update :assign_created_job_tasks_qsequence_if_succeeded
api_accessible :user, extend: :common do |t|
t.add :job_uuid
@@ -24,13 +23,4 @@ class JobTask < ArvadosModel
JobTask.delete_all ['created_by_job_task_uuid = ?', self.uuid]
end
end
-
- def assign_created_job_tasks_qsequence_if_succeeded
- if self.success == false and self.success != self.success_was
- # xxx qsequence should be sequential as advertised; for now at
- # least it's non-decreasing.
- JobTask.update_all(['qsequence = ?', (Time.now.to_f*10000000).to_i],
- ['created_by_job_task_uuid = ?', self.uuid])
- end
- end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list