arvados-cli 0.1.20140630125016 → 0.1.20140630151639

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arv +13 -7
  3. data/bin/crunch-job +2 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b93dd489c88556be4e285449687a90022ee156e1
4
- data.tar.gz: 7ee964d54c8bf14b31ab61938de6880b6729d7cd
3
+ metadata.gz: 1ab5006d538fbed03346c5d6e2afe002f31f172d
4
+ data.tar.gz: 232018d545f96fb365539459920aae1b28ecae97
5
5
  SHA512:
6
- metadata.gz: ada1ca559f499f3284ccaf285743cfab254187eef0c7e34810a6e37d03325ce70c965ee79a48bd1ea292850da58f8279cdfcedf0915f4e8cf78606563511d872
7
- data.tar.gz: e6f8f3d3a0d08d6caa0566e882f2704a6de03d0aa342ec111bb552258c3ac9627591cb279094225df70b8d13eef35f3f9690ecd3bc805f03ff9a1d5871502053
6
+ metadata.gz: 88a55f9823ba0230976b81f8e8a37dc026c8249e8317eee2589a2630384e30aead9863070cb95935e8dca600223a03c4793657195a4bc2e8cecf635da73a7690
7
+ data.tar.gz: 9fad0ffa4d13342cbb048755a631f3887d7f93433ab3e45550cfa947d39157528105ecab10430e5d7cb32a5d00e8dca16acdb976af41d42039b8f8a620db4971
data/bin/arv CHANGED
@@ -56,14 +56,20 @@ class Google::APIClient
56
56
  return @discovery_documents["#{api}:#{version}"] ||=
57
57
  begin
58
58
  # fetch new API discovery doc if stale
59
- cached_doc = File.expand_path '~/.cache/arvados/discovery_uri.json'
60
- if not File.exist?(cached_doc) or (Time.now - File.mtime(cached_doc)) > 86400
59
+ cached_doc = File.expand_path '~/.cache/arvados/discovery_uri.json' rescue nil
60
+
61
+ if cached_doc.nil? or not File.exist?(cached_doc) or (Time.now - File.mtime(cached_doc)) > 86400
61
62
  response = self.execute!(:http_method => :get,
62
63
  :uri => self.discovery_uri(api, version),
63
64
  :authenticated => false)
64
- FileUtils.makedirs(File.dirname cached_doc)
65
- File.open(cached_doc, 'w') do |f|
66
- f.puts response.body
65
+
66
+ begin
67
+ FileUtils.makedirs(File.dirname cached_doc)
68
+ File.open(cached_doc, 'w') do |f|
69
+ f.puts response.body
70
+ end
71
+ rescue
72
+ return JSON.load response.body
67
73
  end
68
74
  end
69
75
 
@@ -85,8 +91,8 @@ end
85
91
  def init_config
86
92
  # read authentication data from arvados configuration file if present
87
93
  lineno = 0
88
- config_file = File.expand_path('~/.config/arvados/settings.conf')
89
- if File.exist? config_file then
94
+ config_file = File.expand_path('~/.config/arvados/settings.conf') rescue nil
95
+ if not config_file.nil? and File.exist? config_file then
90
96
  File.open(config_file, 'r').each do |line|
91
97
  lineno = lineno + 1
92
98
  # skip comments
data/bin/crunch-job CHANGED
@@ -622,6 +622,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
622
622
  $ENV{"TASK_SLOT_NODE"} = $slot[$childslot]->{node}->{name};
623
623
  $ENV{"TASK_SLOT_NUMBER"} = $slot[$childslot]->{cpu};
624
624
  $ENV{"TASK_WORK"} = $ENV{"JOB_WORK"}."/$id.$$";
625
+ $ENV{"HOME"} = $ENV{"TASK_WORK"};
625
626
  $ENV{"TASK_KEEPMOUNT"} = $ENV{"TASK_WORK"}.".keep";
626
627
  $ENV{"TASK_TMPDIR"} = $ENV{"TASK_WORK"}; # deprecated
627
628
  $ENV{"CRUNCH_NODE_SLOTS"} = $slot[$childslot]->{node}->{ncpus};
@@ -661,6 +662,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
661
662
  $command .= "-v \Q$ENV{TASK_WORK}:/tmp/crunch-job:rw\E ";
662
663
  $command .= "-v \Q$ENV{CRUNCH_SRC}:/tmp/crunch-src:ro\E ";
663
664
  $command .= "-v \Q$ENV{TASK_KEEPMOUNT}:/mnt:ro\E ";
665
+ $command .= "-e \QHOME=/tmp/crunch-job\E ";
664
666
  while (my ($env_key, $env_val) = each %ENV)
665
667
  {
666
668
  if ($env_key =~ /^(ARVADOS|JOB|TASK)_/) {
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.20140630125016
4
+ version: 0.1.20140630151639
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 685f9cb6a771db0d25f000e5bf8616ba1832a218
149
+ description: This is the Arvados SDK CLI gem, git revision 2c4e6de200fa8fd40eb33cd2a4470d41f27227a7
150
150
  email: gem-dev@curoverse.com
151
151
  executables:
152
152
  - arv