Changeset 25429
- Timestamp:
- Sep 17, 2009, 10:04:08 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 1 deleted
- 4 edited
-
ippTasks/dist.pro (modified) (3 diffs)
-
ippTools/share/Makefile.am (modified) (1 diff)
-
ippTools/share/disttool_pending_camera.sql (added)
-
ippTools/share/disttool_pending_chip.sql (added)
-
ippTools/share/disttool_pending_diff.sql (added)
-
ippTools/share/disttool_pending_fake.sql (added)
-
ippTools/share/disttool_pending_raw.sql (added)
-
ippTools/share/disttool_pending_stack.sql (added)
-
ippTools/share/disttool_pending_warp.sql (added)
-
ippTools/share/disttool_pendingcomponent.sql (deleted)
-
ippTools/src/disttool.c (modified) (4 diffs)
-
ippTools/src/disttoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/dist.pro
r25113 r25429 16 16 $distQueue_DB = 0 17 17 18 ### list of stages 19 #list of stages 20 $STAGE:n = 0 21 list STAGE -add "raw" 22 list STAGE -add "chip" 23 list STAGE -add "camera" 24 list STAGE -add "fake" 25 list STAGE -add "warp" 26 list STAGE -add "diff" 27 list STAGE -add "stack" 28 29 $currentStage = 0 30 18 31 ### Check status of tasks 19 32 macro dist.status … … 78 91 79 92 task.exec 80 $run = disttool -pendingcomponent 93 $run = disttool -pendingcomponent -stage $STAGE:$currentStage 94 $currentStage ++ 95 if ($currentStage >= $STAGE:n) set currentStage = 0 81 96 if ($DB:n == 0) 82 97 option DEFAULT … … 85 100 option $DB:$distToProcess_DB 86 101 $run = $run -dbname $DB:$distToProcess_DB 87 $distToProcess_DB ++ 88 if ($distToProcess_DB >= $DB:n) set distToProcess_DB = 0 102 103 # only increment the database number after we have gone through all of 104 # the stages 105 if ($currentStage == 0) 106 $distToProcess_DB ++ 107 if ($distToProcess_DB >= $DB:n) set distToProcess_DB = 0 108 end 89 109 end 90 110 add_poll_args run -
trunk/ippTools/share/Makefile.am
r25423 r25429 110 110 disttool_definebyquery_stack.sql \ 111 111 disttool_definebyquery_warp.sql \ 112 disttool_pendingcomponent.sql \ 112 disttool_pending_camera.sql \ 113 disttool_pending_chip.sql \ 114 disttool_pending_diff.sql \ 115 disttool_pending_fake.sql \ 116 disttool_pending_raw.sql \ 117 disttool_pending_stack.sql \ 118 disttool_pending_warp.sql \ 113 119 disttool_pendingfileset.sql \ 114 120 disttool_pendingdest.sql \ -
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); -
trunk/ippTools/src/disttoolConfig.c
r24871 r25429 95 95 // -pendingcomponent 96 96 psMetadata *pendingcomponentArgs = psMetadataAlloc(); 97 psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-stage", 0, "limit results to runs for stage (required)", NULL); 97 98 psMetadataAddS64(pendingcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 98 psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-stage", 0, "limit results to runs for stage", NULL);99 99 psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-label", PS_META_DUPLICATE_OK, "limit results to label", NULL); 100 100 psMetadataAddU64(pendingcomponentArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
