IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 15, 2009, 5:28:09 PM (17 years ago)
Author:
Paul Price
Message:

Adding script to do the actual publishing to DataStore. Decided to bundle all components into the same script (we're working with detections, it's serial, should be fast) to simply things (can remove the 'advance' mode for pubtool). Everything compiles, not tested yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_mops/ippTools/share/pubtool_pending.sql

    r24392 r24427  
    11SELECT
    2     publishRun.pub_id,
    3     publishRun.stage_id,
    4     publishClient.destination,
    5     publishClient.stage,
    6     publishClient.format,
    7     publishToDo.component
    8 FROM publishRun
    9 JOIN publishClient USING(client_id)
    10 JOIN ((
     2    publishToDo.*
     3FROM ((
    114    SELECT
    12         pub_id,
    13         diff_id AS stage_id,
    14         skycell_id AS component
     5        publishRun.pub_id,
     6        publishClient.product,
     7        publishClient.stage,
     8        diffRun.diff_id AS stage_id,
     9        publishRun.workdir
    1510    FROM publishRun
    1611    JOIN publishClient USING(client_id)
     
    1914    JOIN diffSkyfile USING(diff_id)
    2015    WHERE publishClient.stage = 'diff'
     16        AND publishRun.state = 'new'
     17        AND diffRun.state = 'full'
    2118    ) AS publishDiffs UNION (
    2219    SELECT
    23         pub_id,
    24         cam_id AS stage_id,
    25         NULL AS component
     20        publishRun.pub_id,
     21        publishClient.product,
     22        publishClient.stage,
     23        camRun.cam_id AS stage_id,
     24        publishRun.workdir
    2625    FROM publishRun
    2726    JOIN publishClient USING(client_id)
     
    2928        ON camRun.cam_id = publishRun.stage_id
    3029    WHERE publishClient.stage = 'camera'
     30        AND publishRun.state ='new'
     31        AND camRun.state = 'full'
    3132    ) AS publishCams
    32 ) AS publishToDo USING(pub_id, stage_id)
    33 LEFT JOIN publishFile USING(pub_id, component)
    34 WHERE publishRun.state = 'new'
    35     AND publishFile.pub_id IS NULL
     33) AS publishToDo
     34LEFT JOIN publishDone USING(pub_id)
     35WHERE publishDone.pub_id IS NULL
Note: See TracChangeset for help on using the changeset viewer.