arvados-cli 0.1.20140603110100 → 0.1.20140603160755
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 +24 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b102c049fb1474dde6387bcf04eb8fb4fbaf6b8
|
4
|
+
data.tar.gz: 4c9886bb4a024837061b9b62cd3da4b9412ac695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a420ecd6b4e996bed10ed546236afe2ef037782a1a69622a05a924e0f9a8684b9adf3952bd0ae71b1275abd0958f4ebe8b56a282be67808ea37ecccd870458e6
|
7
|
+
data.tar.gz: 8337f875d4d1aa7de6f8427450821d258a9e0b6a6895a01c0f6845b0735f25c23c25c8305df9502a10fbdd2cb6390b5c4f2665753173504c77abc9bb91e0bb83
|
data/bin/crunch-job
CHANGED
@@ -76,6 +76,7 @@ use strict;
|
|
76
76
|
use POSIX ':sys_wait_h';
|
77
77
|
use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
|
78
78
|
use Arvados;
|
79
|
+
use Digest::MD5 qw(md5_hex);
|
79
80
|
use Getopt::Long;
|
80
81
|
use IPC::Open2;
|
81
82
|
use IO::Select;
|
@@ -799,21 +800,37 @@ goto ONELEVEL if !defined $main::success;
|
|
799
800
|
|
800
801
|
release_allocation();
|
801
802
|
freeze();
|
803
|
+
my $collated_output = &collate_output();
|
804
|
+
|
802
805
|
if ($job_has_uuid) {
|
803
|
-
$Job->update_attributes('
|
804
|
-
'
|
805
|
-
'success' => $Job->{'output'} && $main::success,
|
806
|
+
$Job->update_attributes('running' => 0,
|
807
|
+
'success' => $collated_output && $main::success,
|
806
808
|
'finished_at' => scalar gmtime)
|
807
809
|
}
|
808
810
|
|
809
|
-
if ($
|
811
|
+
if ($collated_output)
|
810
812
|
{
|
811
813
|
eval {
|
812
|
-
my $
|
813
|
-
|
814
|
-
|
814
|
+
open(my $orig_manifest, '-|', 'arv', 'keep', 'get', $collated_output)
|
815
|
+
or die "failed to get collated manifest: $!";
|
816
|
+
# Read the original manifest, and strip permission hints from it,
|
817
|
+
# so we can put the result in a Collection.
|
818
|
+
my @manifest_lines = ();
|
819
|
+
while (my $manifest_line = <$orig_manifest>) {
|
820
|
+
my @words = split(/ /, $manifest_line, -1);
|
821
|
+
foreach my $ii (0..$#words) {
|
822
|
+
if ($words[$ii] =~ /^[0-9a-f]{32}\+/) {
|
823
|
+
$words[$ii] =~ s/\+A[0-9a-f]{40}@[0-9a-f]{8}\b//;
|
824
|
+
}
|
825
|
+
}
|
826
|
+
push(@manifest_lines, join(" ", @words));
|
827
|
+
}
|
828
|
+
my $manifest_text = join("", @manifest_lines);
|
829
|
+
my $output = $arv->{'collections'}->{'create'}->execute('collection' => {
|
830
|
+
'uuid' => md5_hex($manifest_text),
|
815
831
|
'manifest_text' => $manifest_text,
|
816
832
|
});
|
833
|
+
$Job->update_attributes('output' => $output->{uuid});
|
817
834
|
if ($Job->{'output_is_persistent'}) {
|
818
835
|
$arv->{'links'}->{'create'}->execute('link' => {
|
819
836
|
'tail_kind' => 'arvados#user',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.20140603160755
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvados Authors
|
@@ -146,7 +146,7 @@ dependencies:
|
|
146
146
|
- - "~>"
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0.8'
|
149
|
-
description: This is the Arvados SDK CLI gem, git revision
|
149
|
+
description: This is the Arvados SDK CLI gem, git revision a4378cd48648a9ca315713535f651d1bbace322f
|
150
150
|
email: gem-dev@curoverse.com
|
151
151
|
executables:
|
152
152
|
- arv
|