mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
remove sqllite db , add finished colomn
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Phrasea\Model\Repositories;
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\WorkerRunningUploader;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
class WorkerRunningUploaderRepository extends EntityRepository
|
||||
{
|
||||
public function getEntityManager()
|
||||
{
|
||||
return parent::getEntityManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $commitId
|
||||
* @return bool
|
||||
*/
|
||||
public function canAck($commitId)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('w');
|
||||
$res = $qb
|
||||
->where('w.commitId = :commitId')
|
||||
->andWhere('w.status != :status')
|
||||
->setParameters([
|
||||
'commitId' => $commitId,
|
||||
'status' => WorkerRunningUploader::DOWNLOADED
|
||||
])
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
|
||||
return count($res) == 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user