IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 27, 2011, 9:42:21 AM (15 years ago)
Author:
bills
Message:

order pending components by priority

File:
1 edited

Legend:

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

    r27457 r30387  
    1717    0 as quality,
    1818    distRun.no_magic,
    19     rawImfile.magicked
     19    rawImfile.magicked,
     20    IFNULL(Label.priority, 10000) AS priority
    2021FROM distRun
    2122JOIN distTarget USING(target_id, stage, clean)
     
    2829    ON distRun.dist_id = distComponent.dist_id
    2930    AND rawImfile.class_id = distComponent.component
     31LEFT JOIN Label ON distRun.label = Label.label
    3032WHERE
    3133    distRun.state = 'new'
     
    3436    AND distComponent.dist_id IS NULL
    3537    AND (rawExp.magicked OR distRun.no_magic)
     38    AND (Label.active OR Label.active IS NULL)
    3639UNION
    3740    -- raw stage alternate inputs
     
    5457    0 as quality,
    5558    distRun.no_magic,
    56     rawImfile.magicked
     59    rawImfile.magicked,
     60    IFNULL(Label.priority, 10000) AS priority
    5761FROM distRun
    5862JOIN distTarget USING(target_id, stage, clean)
     
    6872    ON distRun.dist_id = distComponent.dist_id
    6973    AND rawImfile.class_id = distComponent.component
     74LEFT JOIN Label ON distRun.label = Label.label
    7075WHERE
    7176    distRun.state = 'new'
     
    7479    AND chipProcessedImfile.data_state = 'full'
    7580    AND chipProcessedImfile.magicked > 0
     81    AND (Label.active OR Label.active IS NULL)
    7682UNION
    7783    -- raw stage clean (dbinfo only)
     
    9399    0 as quality,
    94100    distRun.no_magic,
    95     rawExp.magicked
     101    rawExp.magicked,
     102    IFNULL(Label.priority, 10000) AS priority
    96103FROM distRun
    97104JOIN distTarget USING(target_id, stage, clean)
     
    99106LEFT JOIN distComponent
    100107    ON distRun.dist_id = distComponent.dist_id
     108LEFT JOIN Label ON distRun.label = Label.label
    101109WHERE
    102110    distRun.state = 'new'
     
    104112    AND distRun.clean
    105113    AND distComponent.dist_id IS NULL
     114    AND (Label.active OR Label.active IS NULL)
Note: See TracChangeset for help on using the changeset viewer.