Changeset 16959
- Timestamp:
- Mar 12, 2008, 11:37:23 AM (18 years ago)
- Location:
- trunk/pstamp/scripts
- Files:
-
- 1 added
- 3 edited
-
pstamp_get_image_job.pl (added)
-
pstamp_listjobs.pl (modified) (2 diffs)
-
pstamp_runcommand.sh (modified) (1 diff)
-
pstamp_webrequest.pl (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_listjobs.pl
r16358 r16959 2 2 ### 3 3 ### pstamp_listjobs.pl 4 ### list the job_id, state, and uri for the postage stamp jobs queued for a given4 ### list the job_id, state, and data store uri for the postage stamp jobs queued for a given 5 5 ### postage stamp request id 6 6 ### … … 80 80 if (! @psjobs) { 81 81 print STDERR "no postage stamp jobs for request $request_id found\n"; 82 exit 1;82 exit 0; 83 83 } 84 84 85 85 foreach my $job (@psjobs) { 86 print "$job->{job_id} $job->{state} $job->{outputBase}.fits\n"; 86 # 87 # convert from filename to data store relative uri 88 # XXX arguably we shouldn't do this here. this should be a function 89 # of the web interface. But since this script is only used by 90 # the web interface .... 91 my $i = index($job->{outputBase}, "dsroot/"); 92 93 my $uri; 94 if ($i > 0) { 95 $uri = "/ds" . substr($job->{outputBase}, $i + 6) . ".fits"; 96 } else { 97 $uri = "$job->{outputBase}" . ".fits"; 98 } 99 100 print "$job->{job_id} $job->{state} $uri\n"; 87 101 } 88 102 -
trunk/pstamp/scripts/pstamp_runcommand.sh
r16764 r16959 65 65 #### Finally, execute the command given by the command line arguments 66 66 67 umask 0 68 67 69 $* -
trunk/pstamp/scripts/pstamp_webrequest.pl
r16899 r16959 42 42 ); 43 43 44 use Cwd; 45 44 46 my $missing_tools; 45 47 … … 54 56 } 55 57 56 57 58 # if -list is used, it must be the first argument 58 59 my $listMode; … … 63 64 } 64 65 65 my $request_file = "request_file.$$.fits"; 66 my $cur_dir = getcwd(); 67 my $request_file = "$cur_dir/request_file.$$.fits"; 66 68 { 67 69 my $command = "$pstamprequest $request_file @ARGV"; … … 73 75 } 74 76 } 75 76 77 77 78 # ok at this point we have a request file add it to the database (unless we're in listMode) … … 95 96 { 96 97 97 my $command = "$pstamptool -addreq -uri $request_file ";98 my $command = "$pstamptool -addreq -uri $request_file -out_fileset \'pstampresults/web\$REQ_ID\'"; 98 99 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 99 100 run(command => $command, verbose => $verbosity); … … 105 106 } 106 107 107 # parse the file to queue the jobs108 {109 my $command = "$pstampparser_run $request_id";110 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =111 run(command => $command, verbose => $verbosity);112 unless ($success) {113 print STDERR @$stderr_buf;114 die("Unable to perform pstamparser_run -addreq: $error_code");115 }116 }117 118 # note: $request_id still has a newline119 108 print "$request_id"; 120 109
Note:
See TracChangeset
for help on using the changeset viewer.
