Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f064419
Issue-ID: SO-2071
Signed-off-by: Yulian Han <elaine.hanyulian@huawei.com>
List<InfraActiveRequests> findByStartTimeLessThanAndEndTime(Date startTime, Date endTime, Pageable request);
- @Query(value = "SELECT * FROM infra_active_requests WHERE request_status = 'IN_PROGRESS' AND (request_scope = 'volumeGroup' OR request_scope = 'vfModule') AND start_time < (NOW() - INTERVAL 2 MINUTE)",
- nativeQuery = true)
+ @Query(value = "SELECT * FROM infra_active_requests WHERE request_status = 'IN_PROGRESS' AND (request_scope = 'volumeGroup' OR request_scope = 'vfModule') AND start_time < (NOW() - INTERVAL 2 MINUTE)"
+ + " ORDER BY start_time DESC", nativeQuery = true)
List<InfraActiveRequests> getInProgressVolumeGroupsAndVfModules();
}