Changeset 24038 for trunk/ippScripts/scripts
- Timestamp:
- May 1, 2009, 5:28:52 PM (17 years ago)
- Location:
- trunk/ippScripts/scripts
- Files:
-
- 1 added
- 3 edited
-
dist_queue_runs.pl (modified) (1 diff)
-
receive_advance.pl (added)
-
receive_file.pl (modified) (5 diffs)
-
receive_setstatus.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_queue_runs.pl
r24001 r24038 98 98 } 99 99 100 # queue rcRuns for any distRuns that have completed and have interested destinations 101 { 102 my $command = "$disttool -queuercrun"; 103 $command .= " -dbname $dbname" if defined $dbname; 104 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 105 run(command => $command, verbose => $verbose); 106 unless ($success) { 107 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 108 &my_die("Unable to perform $command error_code: $error_code", $error_code); 109 } 110 # display the output from the command 111 print STDERR join "", @$stdout_buf if $verbose; 112 } 113 100 114 exit 0; 101 115 -
trunk/ippScripts/scripts/receive_file.pl
r23895 r24038 36 36 37 37 # Parse the command-line arguments 38 my ( $file_id, $source, $product, $fileset, $file , $workdir, $dbname, $verbose, $no_update, $save_temps );38 my ( $file_id, $source, $product, $fileset, $fileset_id, $file, $workdir, $dbname, $verbose, $no_update, $save_temps ); 39 39 40 40 GetOptions( … … 43 43 'product=s' => \$product, # Product for data 44 44 'fileset=s' => \$fileset, # Fileset for data 45 'fileset_id=s' => \$fileset_id, # database id for the fileset 45 46 'file=s' => \$file, # File to retrieve 46 47 'workdir=s' => \$workdir, # Working directory for output … … 61 62 defined $workdir; 62 63 64 $tempdir .= "/$file_id"; 65 63 66 my $ipprc = PS::IPP::Config->new() or 64 67 &my_die( "Unable to set up", $file_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration … … 80 83 # Load into database 81 84 85 my $target = "$workdir/$file"; # Target destination for file 86 my $fixName = $ipprc->file_create( $target ); # Target for move 87 my $fixFile; 88 89 open $fixFile, ">$fixName" or die "can't open $fixName\n"; 90 82 91 # Need to fix paths to point to new workdir 83 my ($fixFile, $fixName) = tempfile( "$tempdir/$file.XXXX", UNLINK => !$save_temps ); # Fixed file84 92 open my $inFile, $filename or die "Can't open $filename\n"; # Input file 85 93 my $workdir_old; # Old workdir … … 98 106 } 99 107 close($inFile); 100 101 my ($stage) = $file =~ m|^dbinfo\.(\S+)\.\d+\.mdc$|; # Stage of interest 102 my $tool = can_run("${stage}tool") or die "Can't find tool to load $file\n"; 103 104 my $command = "$tool -importrun -infile $fixName"; # Command to execute 108 close($fixFile); 109 #{ 110 my $command = "$receivetool -updatefileset -fileset_id $fileset_id -dbinfo_uri $fixName"; # Command to execute 105 111 $command .= " -dbname $dbname" if defined $dbname; 106 112 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 107 113 run(command => $command, verbose => $verbose); 108 die "Unable to load $fixName\n" unless $success; 114 die "Unable to set dbinfo_uri for $fileset_id to $fixName\n" unless $success; 115 #} 116 109 117 } elsif ($file =~ m|.*\.tgz$|) { 110 118 # Get contents of tarball -
trunk/ippScripts/scripts/receive_setstatus.pl
r24031 r24038 51 51 52 52 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 53 pod2usage( -msg => "Required options: -- dest_id --status_uri",53 pod2usage( -msg => "Required options: --status_fs_name --status_product", 54 54 -exitval => 3) unless 55 defined $ status_fs_name and55 defined $received_fs_name and 56 56 defined $status_product and 57 57 defined $fault; 58 58 # and ($fault == 0 or defined $status_file); 59 60 # if a name for the status fileset is not provided use the received value 61 $status_fs_name = $received_fs_name if !defined $status_fs_name; 59 62 60 63 $ipprc->redirect_output($logfile) if $logfile;
Note:
See TracChangeset
for help on using the changeset viewer.
