mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Add third party application webhook event
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2014 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Alchemy\Phrasea\Model\Repositories;
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\WebhookEventDelivery;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* WebhookEventDeliveryRepository
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class WebhookEventDeliveryRepository extends EntityRepository
|
||||
{
|
||||
public function findUndeliveredEvents()
|
||||
{
|
||||
$qb = $this->createQueryBuilder('e');
|
||||
|
||||
$qb
|
||||
->where($qb->expr()->eq('e.delivered', $qb->expr()->literal(false)))
|
||||
->andWhere($qb->expr()->lt('e.deliveryTries', ':nb_tries'));
|
||||
|
||||
$qb->setParameter(':nb_tries', WebhookEventDelivery::MAX_DELIVERY_TRIES);
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user