IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 7, 2009, 4:25:35 PM (17 years ago)
Author:
watersc1
Message:

Updates to various tools to fix errors in cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/warptool.c

    r25778 r25800  
    17091709    PXOPT_LOOKUP_STR(skycell_id, config->args, "-skycell_id", true, false);
    17101710    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
    1711 
    1712     psString query = pxDataGet("warptool_updateskyfile.sql");
    1713 
    1714     if (!p_psDBRunQueryF(config->dbh, query, fault, warp_id, skycell_id)) {
    1715         psError(PS_ERR_UNKNOWN, false, "database error");
    1716         return false;
    1717     }
    1718     psFree(query);
     1711    PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
     1712
     1713    if (!state) {
     1714      psString query = pxDataGet("warptool_updateskyfile.sql");
     1715     
     1716      if (!p_psDBRunQueryF(config->dbh, query, fault, warp_id, skycell_id)) {
     1717        psError(PS_ERR_UNKNOWN, false, "database error");
     1718        return false;
     1719      }
     1720      psFree(query);
     1721    }
     1722    else {
     1723      if (strcmp(state,"error_cleaned") == 0) {
     1724        change_skyfile_data_state(config,"error_cleaned","goto_cleaned");
     1725      }
     1726      else if (strcmp(state, "error_scrubbed") == 0) {
     1727        change_skyfile_data_state(config,"error_scrubbed","goto_scrubbed");
     1728      }
     1729      else if (strcmp(state, "error_purged") == 0) {
     1730        change_skyfile_data_state(config,"error_purged","goto_purged");
     1731      }
     1732      else {
     1733        psError(PS_ERR_UNKNOWN, false, "unhandled state given");
     1734        return(false);
     1735      }
     1736    }
    17191737
    17201738    return true;
Note: See TracChangeset for help on using the changeset viewer.