IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 13, 2008, 11:40:35 AM (18 years ago)
Author:
bills
Message:

Fix url for get_image mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_listjobs.pl

    r16959 r16976  
    6868    if (@$stdout_buf == 0) {
    6969        print STDERR "no pstamp jobs for request $request_id\n";
    70         exit 1;
     70        exit 0;
    7171    }
    7272    my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     
    7979
    8080if (! @psjobs) {
    81     print STDERR "no postage stamp jobs for request $request_id found\n";
     81    print STDERR "no postage stamp jobs for request $request_id\n";
    8282    exit 0;
    8383}
     
    8686    #
    8787    # 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 ....
     88    # XXX arguably we shouldn't do this here.
     89    # This should be a function of the web interface. However, since this script
     90    # is only used by the web interface ....
    9191    my $i = index($job->{outputBase}, "dsroot/");
     92
     93    my $add_fits = 0;
     94    if ($job->{jobType} ne "get_image") {
     95        $add_fits = 1;
     96    }
    9297
    9398    my $uri;
    9499    if ($i > 0) {
    95         $uri = "/ds" . substr($job->{outputBase}, $i + 6) . ".fits";
     100        $uri = "/ds" . substr($job->{outputBase}, $i + 6);
    96101    } else {
    97         $uri = "$job->{outputBase}" . ".fits";
     102        $uri = "$job->{outputBase}";
     103    }
     104
     105    if ($add_fits) {
     106        $uri .= ".fits";
    98107    }
    99108
Note: See TracChangeset for help on using the changeset viewer.