arvados-cli 0.1.20140811234926 → 0.1.20140812091227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/crunch-job +13 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a54d204bc47cb5d1f271ebff704b547ecc57a113
|
4
|
+
data.tar.gz: bd221ef8fa3fe22c4b23d37013eb2cc1abfdced8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3404b992ede6e0accb516fb2ee93c9ace7e2211a83ac20d770317a88b0c46ae019c427fe640de22e1a177ae5bcb0c505a082fa100cc74fedb9d8939cacb4db38
|
7
|
+
data.tar.gz: f9fa9924d67878175f64e8f4c9250d40918c700bd99d7d99c7b5fe18704e111ab1d73d42b745429b8e7a5d2d4c7286d673f9d3965b1874bf6a0d32fa162e185f
|
data/bin/crunch-job
CHANGED
@@ -84,6 +84,8 @@ use File::Temp;
|
|
84
84
|
use Fcntl ':flock';
|
85
85
|
use File::Path qw( make_path );
|
86
86
|
|
87
|
+
use constant EX_TEMPFAIL => 75;
|
88
|
+
|
87
89
|
$ENV{"TMPDIR"} ||= "/tmp";
|
88
90
|
unless (defined $ENV{"CRUNCH_TMP"}) {
|
89
91
|
$ENV{"CRUNCH_TMP"} = $ENV{"TMPDIR"} . "/crunch-job";
|
@@ -151,24 +153,24 @@ if ($job_has_uuid)
|
|
151
153
|
$Job = $arv->{'jobs'}->{'get'}->execute('uuid' => $jobspec);
|
152
154
|
if (!$force_unlock) {
|
153
155
|
# If some other crunch-job process has grabbed this job (or we see
|
154
|
-
# other evidence that the job is already underway) we exit
|
155
|
-
# crunch-dispatch (our parent process) doesn't
|
156
|
-
# failed.
|
156
|
+
# other evidence that the job is already underway) we exit
|
157
|
+
# EX_TEMPFAIL so crunch-dispatch (our parent process) doesn't
|
158
|
+
# mark the job as failed.
|
157
159
|
if ($Job->{'is_locked_by_uuid'}) {
|
158
|
-
Log(undef, "Job is locked by " . $Job->{'is_locked_by_uuid'}
|
159
|
-
exit
|
160
|
+
Log(undef, "Job is locked by " . $Job->{'is_locked_by_uuid'});
|
161
|
+
exit EX_TEMPFAIL;
|
160
162
|
}
|
161
163
|
if ($Job->{'success'} ne undef) {
|
162
164
|
Log(undef, "Job 'success' flag (" . $Job->{'success'} . ") is not null");
|
163
|
-
exit
|
165
|
+
exit EX_TEMPFAIL;
|
164
166
|
}
|
165
167
|
if ($Job->{'running'}) {
|
166
168
|
Log(undef, "Job 'running' flag is already set");
|
167
|
-
exit
|
169
|
+
exit EX_TEMPFAIL;
|
168
170
|
}
|
169
171
|
if ($Job->{'started_at'}) {
|
170
172
|
Log(undef, "Job 'started_at' time is already set (" . $Job->{'started_at'} . ")");
|
171
|
-
exit
|
173
|
+
exit EX_TEMPFAIL;
|
172
174
|
}
|
173
175
|
}
|
174
176
|
}
|
@@ -281,8 +283,8 @@ if ($job_has_uuid)
|
|
281
283
|
# Claim this job, and make sure nobody else does
|
282
284
|
unless ($Job->update_attributes('is_locked_by_uuid' => $User->{'uuid'}) &&
|
283
285
|
$Job->{'is_locked_by_uuid'} == $User->{'uuid'}) {
|
284
|
-
Log(undef, "Error while updating / locking job, exiting
|
285
|
-
exit
|
286
|
+
Log(undef, "Error while updating / locking job, exiting ".EX_TEMPFAIL);
|
287
|
+
exit EX_TEMPFAIL;
|
286
288
|
}
|
287
289
|
$Job->update_attributes('started_at' => scalar gmtime,
|
288
290
|
'running' => 1,
|
@@ -893,7 +895,7 @@ else {
|
|
893
895
|
Log (undef, "finish");
|
894
896
|
|
895
897
|
save_meta();
|
896
|
-
exit 0;
|
898
|
+
exit ($Job->{'success'} ? 1 : 0);
|
897
899
|
|
898
900
|
|
899
901
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arvados-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20140812091227
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvados Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: arvados
|
@@ -166,7 +166,7 @@ dependencies:
|
|
166
166
|
- - "<"
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: 1.0.0
|
169
|
-
description: This is the Arvados SDK CLI gem, git revision
|
169
|
+
description: This is the Arvados SDK CLI gem, git revision ed1580a38c1aae0910cef83605622a41d927fba3
|
170
170
|
email: gem-dev@curoverse.com
|
171
171
|
executables:
|
172
172
|
- arv
|