Project

General

Profile

Bug #11121

Updated by Tom Clegg about 7 years ago

We do this with the log collection 

 <pre><code class="perl"> 
   my $log_coll = api_call( 
     "collections/create", ensure_unique_name => 1, collection => { 
       manifest_text => $log_manifest, 
       owner_uuid => $Job->{owner_uuid}, 
       name => sprintf("Log from %s job %s", $Job->{script}, $Job->{uuid}), 
     }); 
 </code></pre> 

 but we need to do it with the output collection too. 

 <pre><code class="perl"> 
   my $pid = open2($child_out, $child_in, 'python', '-c', q{ 
 import arvados 
 import sys 
 print (arvados.api("v1").collections(). 
        create(body={"manifest_text": sys.stdin.read()}). 
        execute(num_retries=int(sys.argv[1]))["portable_data_hash"]) 
 }, retry_count()); 
 </code></pre> 

 source:sdk/cli/bin/crunch-job

Back