Changeset 16358 for trunk/pstamp/scripts/pstamp_dorequest.pl
- Timestamp:
- Feb 7, 2008, 2:48:11 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_dorequest.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_dorequest.pl
r16283 r16358 1 1 #!/bin/env perl 2 2 ### 3 ### pstamp do_req.pl3 ### pstamp_dorequest.pl 4 4 ### 5 ### Run the jobs for a given request6 ### This is intended for running outsidepantasks environment5 ### Excecute the jobs for a given request. 6 ### Note: This is intended for testing outside of pantasks environment 7 7 ### 8 8 … … 16 16 my $request_id = $ARGV[0]; 17 17 18 my $verbosity = 1;18 my $verbosity = 0; 19 19 20 20 use Sys::Hostname; … … 77 77 foreach my $job (@$jobs) { 78 78 if ($job->{req_id} == $request_id) { 79 # there must be a better way to do this 80 print STDERR "adding $job->{job_id} to the list\n"; 79 # print STDERR "adding $job->{job_id} to the list\n"; 81 80 $psjobs[@psjobs] = $job; 82 81 } … … 85 84 86 85 if (! @psjobs) { 86 # TODO: is this always an error, what if the job is no longer pending? 87 87 print STDERR "no pending postage stamp jobs for request $request_id found\n"; 88 # TODO: is this always an error, what if the job is no longer pending?89 88 exit 1; 90 89 } … … 103 102 # Update the state of the request 104 103 # 104 { 105 ## TODO: what about request status 106 my $command = "$pstamptool -processedreq -req_id $request_id -state stop"; 107 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 108 run(command => $command, verbose => $verbosity); 109 unless ($success) { 110 die("Unable to perform pstamptool -processedreq: $error_code"); 111 } 112 } 105 113 106 114 exit 0;
Note:
See TracChangeset
for help on using the changeset viewer.
