add and display interrupt status

This commit is contained in:
aynsix
2020-08-06 15:17:06 +03:00
parent f6854caaba
commit b5b69343bd
13 changed files with 1932 additions and 1777 deletions

View File

@@ -92,6 +92,19 @@ class WorkerRunningJobRepository extends EntityRepository
return count($qb->getQuery()->getResult());
}
public function findByStatus(array $status, $start = 0, $limit = WorkerRunningJob::MAX_RESULT)
{
$qb = $this->createQueryBuilder('w');
$qb
->where($qb->expr()->in('w.status', $status))
->setFirstResult($start)
->setMaxResults($limit)
->orderBy('w.id', 'DESC')
;
return $qb->getQuery()->getResult();
}
/**
* @param $commitId
* @return bool