IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 2, 2014, 5:28:31 PM (12 years ago)
Author:
watersc1
Message:

Fixed major issue where if a stage_id is used in a different stage, it causes infinite problems.

File:
1 edited

Legend:

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

    r36853 r36968  
    1 SELECT
    2        cam_id AS stage_id
    3 FROM camRun
    4        LEFT JOIN remoteComponent ON (remoteComponent.stage_id = camRun.cam_id)
    5        LEFT JOIN remoteRun ON (
    6             remoteComponent.remote_id = remoteRun.remote_id AND
    7             remoteRun.label = camRun.label
    8             )
     1SELECT stage_id FROM
     2
     3( SELECT cam_id AS stage_id
     4    FROM camRun
    95WHERE
    10 camRun.state = 'new' AND
    11 (remoteRun.stage = 'camera' OR remoteRun.state IS NULL) AND
    12 remoteComponent.remote_id IS NULL
     6camRun.state = 'new'
     7-- where hook %s
     8GROUP BY cam_id
     9) AS W
     10
     11LEFT JOIN
     12
     13(SELECT remote_id,remoteRun.stage,remoteRun.label,remoteComponent.stage_id,remoteRun.state
     14   FROM remoteRun
     15   JOIN remoteComponent USING (remote_id)
     16WHERE
     17remoteRun.stage = 'camera'
     18-- where hook %s
     19) AS R
     20USING (stage_id)
     21WHERE R.remote_id IS NULL
Note: See TracChangeset for help on using the changeset viewer.