IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26958


Ignore:
Timestamp:
Feb 16, 2010, 11:20:32 AM (16 years ago)
Author:
watersc1
Message:

This should fix the stack-stack overqueueing bug. The test case for input_label = MD03.nightlyscience now only finds stacks from data_group MD03.20100215, which do not appear to have been queued for SS diffs before.

Location:
trunk/ippTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/difftool_definestackstack_part0.sql

    r26927 r26958  
    55       stackRun.label AS INPUT_label,
    66       stackRun.tess_id AS INPUT_tess_id
     7--     ,
     8--       stackRun.stack_id AS INPUT_stack_id,
     9--       template.max_stack_id,
     10--       diffExp.diff_id
    711FROM stackRun JOIN stackSumSkyfile USING(stack_id)
    812JOIN (
     
    2832     SELECT
    2933            diffRun.diff_id,
    30             stackRun.stack_id
     34            diffInputSkyfile.stack1,
     35            diffInputSkyfile.stack2
    3136     FROM diffRun JOIN diffInputSkyfile USING(diff_id)
    3237          JOIN stackRun ON stackRun.stack_id = diffInputSkyfile.stack1
    3338          JOIN stackSumSkyfile USING(stack_id)
    3439          WHERE 1
    35           -- diff where hook %s
    3640          -- input where hook %s
    37 ) AS diffExp ON stackRun.stack_id = diffExp.stack_id
     41) AS diffExp ON diffExp.stack1 = stackRun.stack_id AND diffExp.stack2 = template.max_stack_id
    3842WHERE
    3943        stackSumSkyfile.fault = 0 AND stackSumSkyfile.quality = 0
     44        -- diff where hook %s
    4045        -- input where hook again %s
    4146ORDER BY stackRun.data_group,stackRun.filter
  • trunk/ippTools/share/difftool_definestackstack_part1.sql

    r26927 r26958  
    3333     SELECT
    3434            diffRun.diff_id,
    35             stackRun.stack_id
     35            diffInputSkyfile.stack1,
     36            diffInputSkyfile.stack2
    3637     FROM diffRun JOIN diffInputSkyfile USING(diff_id)
    3738          JOIN stackRun ON stackRun.stack_id = diffInputSkyfile.stack1
    3839          JOIN stackSumSkyfile USING(stack_id)
    3940          WHERE 1
    40           -- diff where hook %s
    4141          -- input where hook %s
    42 ) AS diffExp ON stackRun.stack_id = diffExp.stack_id
     42) AS diffExp ON diffExp.stack1 = stackRun.stack_id AND diffExp.stack2 = template.max_stack_id
    4343WHERE
    4444        stackSumSkyfile.fault = 0 AND stackSumSkyfile.quality = 0
     45        -- diff where hook %s
    4546        -- input where hook again %s
    4647ORDER BY stackRun.data_group,stackRun.filter,stackRun.skycell_id
  • trunk/ippTools/src/difftool.c

    r26949 r26958  
    18941894  psString diffQuery = NULL;
    18951895  if (! (reRun || newTemplates) ) {
    1896     psStringAppend(&diffQuery, "\n AND diff_id IS NULL");
     1896    psStringAppend(&diffQuery, "\n AND diffExp.diff_id IS NULL");
    18971897  } else {
    18981898    diffQuery = psStringCopy("\n");
     
    19051905    return(false);
    19061906  }
    1907 
     1907  psTrace("difftool",1,query,stack2Query,diffQuery,stack1Query,stack1Query);
     1908/*   exit(10); */
     1909         
    19081910  if (!psDBTransaction(config->dbh)) {
    19091911    psError(PS_ERR_UNKNOWN, false, "database error");
     
    19111913  }
    19121914
    1913   if (!p_psDBRunQueryF(config->dbh, query, stack2Query, diffQuery, stack1Query, stack1Query)) {
     1915  if (!p_psDBRunQueryF(config->dbh, query, stack2Query, stack1Query, diffQuery, stack1Query)) {
    19141916    psError(PS_ERR_UNKNOWN, false, "database error");
    19151917    psFree(query);
     
    19191921    return false;
    19201922  }
     1923
    19211924  psFree(query);
    19221925
     
    19781981    psFree(thisWhere);
    19791982
    1980 /*     psTrace("difftool",1, query,stack2Query,diffQuery,this_stack1Query,this_stack1Query); */
     1983    psTrace("difftool",1, query,stack2Query,diffQuery,this_stack1Query,this_stack1Query);
    19811984    if (!psDBTransaction(config->dbh)) {
    19821985      psError(PS_ERR_UNKNOWN, false, "database error");
     
    19841987    }
    19851988
    1986     if (!p_psDBRunQueryF(config->dbh, query, stack2Query, diffQuery, this_stack1Query, this_stack1Query)) {
     1989    if (!p_psDBRunQueryF(config->dbh, query, stack2Query, this_stack1Query, diffQuery, this_stack1Query)) {
    19871990      psError(PS_ERR_UNKNOWN, false, "database error");
    19881991      psFree(query);
Note: See TracChangeset for help on using the changeset viewer.