PHRAS-3729 Uploader pull mode - make it compatible with PS-461 uploader multi-destinations and permissions (#4116)

* pull mode multi destination

* add patch
This commit is contained in:
Aina Sitraka
2022-09-07 12:49:35 +03:00
committed by GitHub
parent 507219f715
commit 54a96ee8df
29 changed files with 1330 additions and 887 deletions

View File

@@ -430,29 +430,6 @@ class WorkerRunningJobRepository extends EntityRepository
return $q->getResult();
}
/**
* @param $commitId
* @return bool
*/
public function canAckUploader($commitId)
{
$qb = $this->createQueryBuilder('w');
$res = $qb
->where('w.commitId = :commitId')
->andWhere('w.work = :work')
->andWhere('w.status != :status')
->setParameters([
'commitId' => $commitId,
'work' => MessagePublisher::ASSETS_INGEST_TYPE,
'status' => WorkerRunningJob::FINISHED
])
->getQuery()
->getResult()
;
return count($res) == 0;
}
public function truncateWorkerTable()
{
$connection = $this->_em->getConnection();