IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24941


Ignore:
Timestamp:
Jul 29, 2009, 1:36:54 PM (17 years ago)
Author:
bills
Message:

look up exposure information once for subsequent jobs from the same exposure

File:
1 edited

Legend:

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

    r24831 r24941  
    173173    }
    174174
     175    my $exp_info;
     176    my $last_exp_id = 0;
    175177    foreach my $job (@jobs) {
    176178        my $job_id = $job->{job_id};
     
    181183
    182184        my ($row, $req_info, $project) = get_request_info($rows, $rownum);
    183         my $proj_hash = resolve_project($ipprc, $project, $dbname);
    184         my $image_db = $proj_hash->{dbname};
    185 
    186         # get the metadata for the exposure (if any i.e. stack)
    187         # returns an appropriate string if !$exp_id
    188         my $exp_info = get_exposure_info($image_db, $exp_id);
     185
     186        if ($exp_id ne $last_exp_id) {
     187            my $proj_hash = resolve_project($ipprc, $project, $dbname, $dbserver);
     188            my $image_db = $proj_hash->{dbname};
     189            if (!$image_db) {
     190                carp("failed to find imagedb for project: $project");
     191                stop_request($req_id, $PS_EXIT_CONFIG_ERROR);
     192            }
     193
     194            # get the metadata for the exposure (if any i.e. stack)
     195            # returns an appropriate string if !$exp_id
     196            $exp_info = get_exposure_info($image_db, $exp_id);
     197 # XXX: uncomment this and test
     198 #           $last_exp_id = $exp_id;
     199        }
    189200
    190201        if (($job_type eq "stamp") || ($job_type eq "get_image")) {
Note: See TracChangeset for help on using the changeset viewer.