<if test="excludeViewRefresh">
left join components c on c.uuid = cq.main_component_uuid and c.qualifier <> 'VW'
</if>
+ left join ce_queue cq2 on cq.main_component_uuid=cq2.main_component_uuid and cq2.status <>'PENDING'
where
cq.status='PENDING'
and cq.started_at is null
+ and cq2.uuid is null
<if test="excludeIndexationJob">
and cq.task_type <> 'ISSUE_SYNC'
</if>
- and not exists (
- select
- 1
- from
- ce_queue cq2
- where
- cq.main_component_uuid=cq2.main_component_uuid
- and cq2.status <> 'PENDING'
- )
</sql>
<sql id="orderBySelectEligibleForPeek">