mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
remove sqllite db , add finished colomn
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Phrasea\Model\Repositories;
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\WorkerRunningPopulate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
class WorkerRunningPopulateRepository extends EntityRepository
|
||||
{
|
||||
public function getEntityManager()
|
||||
{
|
||||
return parent::getEntityManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $databoxIds
|
||||
* @return int
|
||||
*/
|
||||
public function checkPopulateStatusByDataboxIds(array $databoxIds)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('w');
|
||||
$qb->where($qb->expr()->in('w.databoxId', $databoxIds))
|
||||
->andWhere('w.status = :status')
|
||||
->setParameter('status', WorkerRunningPopulate::RUNNING)
|
||||
;
|
||||
|
||||
return count($qb->getQuery()->getResult());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user