select req from RequestInfo as req where req.id in
(select r.id from RequestInfo as r where (r.status ='QUEUED' or r.status = 'RETRYING') and r.time < :now ORDER BY r.time DESC)
Select r from RequestInfo as r where (r.status ='QUEUED' or r.status ='RETRYING') and id = :id
Select r from RequestInfo as r where r.status ='RUNNING'
Select r from RequestInfo as r where r.status ='QUEUED'
Select r from RequestInfo as r where r.status ='QUEUED' and r.time > :now ORDER BY r.time ASC
Select r from RequestInfo as r where r.status ='DONE'
Select r from RequestInfo as r where r.status ='ERROR'
Select r from RequestInfo as r where r.status ='CANCELLED'
Select r from RequestInfo as r
Select e from ErrorInfo as e
Select e from ErrorInfo as e where e.requestInfo.id = :id
Select r from RequestInfo as r where r.status in (:statuses) ORDER BY r.time DESC
Select r from RequestInfo as r where r.key = :businessKey