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_warp.sql

    r36963 r36968  
    1 SELECT warp_id AS stage_id FROM (
    2 SELECT warp_id, count(warpSkyCellMap.skycell_id) AS N
     1SELECT stage_id FROM
     2
     3( SELECT warp_id AS stage_id, count(warpSkyCellMap.skycell_id) AS N
    34    FROM warpRun
    45    LEFT JOIN warpSkyCellMap USING(warp_id)
    5     LEFT JOIN remoteComponent ON (remoteComponent.stage_id = warpRun.warp_id)
    6     LEFT JOIN remoteRun ON (remoteComponent.remote_id = remoteRun.remote_id
    7                         AND remoteRun.label = warpRun.label             
    8                         AND (remoteRun.stage = 'warp' OR remoteRun.state IS NULL)
    9                         )
    10 WHERE warpRun.state = 'new'
    11 AND (remoteRun.stage = 'warp' OR remoteRun.state IS NULL)
    12 -- AND remoteComponent.remote_id IS NULL
     6WHERE
     7warpRun.state = 'new'
    138-- where hook %s
    149GROUP BY warp_id
    15 ) AS warpTry
    16 WHERE N != 0
     10HAVING N != 0
     11) AS W
    1712
     13LEFT JOIN
     14
     15(SELECT remote_id,remoteRun.stage,remoteRun.label,remoteComponent.stage_id,remoteRun.state
     16   FROM remoteRun
     17   JOIN remoteComponent USING (remote_id)
     18WHERE
     19remoteRun.stage = 'warp'
     20-- where hook %s
     21) AS R
     22USING (stage_id)
     23WHERE R.remote_id IS NULL
     24
Note: See TracChangeset for help on using the changeset viewer.