Changeset 25429 for trunk/ippTools/src/disttool.c
- Timestamp:
- Sep 17, 2009, 10:04:08 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/disttool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/disttool.c
r25031 r25429 2 2 * disttool.c 3 3 * 4 * Copyright (C) 2008 4 * Copyright (C) 2008-2009 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify it … … 600 600 PS_ASSERT_PTR_NON_NULL(config, false); 601 601 602 PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false); 603 602 604 psMetadata *where = psMetadataAlloc(); 603 605 PXOPT_COPY_S64(config->args, where, "-dist_id", "dist_id", "=="); 604 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 605 pxAddLabelSearchArgs (config, where, "-label", "label", "=="); 606 pxAddLabelSearchArgs (config, where, "-label", "distRun.label", "=="); 606 607 607 608 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 608 609 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 609 610 610 // look for "inputs" that need to processed 611 psString query = pxDataGet("disttool_pendingcomponent.sql"); 611 psString queryFile = NULL; 612 psStringAppend(&queryFile, "disttool_pending_%s.sql", stage); 613 psString query = pxDataGet(queryFile); 612 614 if (!query) { 613 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement ");615 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement from %s", queryFile); 614 616 return false; 615 617 } … … 617 619 if (psListLength(where->list)) { 618 620 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 619 psStringAppend(&query, " WHERE%s", whereClause);621 psStringAppend(&query, " AND %s", whereClause); 620 622 psFree(whereClause); 621 623 } … … 629 631 } 630 632 631 // the query has where hooks for each stage. 632 // right now we aren't using them. 633 // XXX: I think that I want to change the query from a union of selects on the various 634 // stages to separate queries. As it is pending data at the later stages of the pipline 635 // will get blocked by pending earlier stages 636 psString raw_where = ""; 637 psString raw_clean_where = ""; 638 psString chip_where = ""; 639 psString camera_where = ""; 640 psString fake_where = ""; 641 psString warp_where = ""; 642 psString diff_where = ""; 643 psString stack_where = ""; 644 645 if (!p_psDBRunQueryF(config->dbh, 646 query, 647 raw_where, 648 raw_clean_where, 649 chip_where, 650 camera_where, 651 fake_where, 652 warp_where, 653 diff_where, 654 stack_where)) { 633 if (!p_psDBRunQuery(config->dbh, query)) { 655 634 psError(PS_ERR_UNKNOWN, false, "database error"); 656 635 psFree(query);
Note:
See TracChangeset
for help on using the changeset viewer.
