Cron cleaning fix.
This commit is contained in:
parent
a8b0f2fa0d
commit
3cf28a612f
|
@ -33,6 +33,7 @@ class DropExpiredCopypastesCommand extends ContainerAwareCommand
|
||||||
$queryBuilder = $em->createQueryBuilder()
|
$queryBuilder = $em->createQueryBuilder()
|
||||||
->delete('SkobkinCopyPasteBundle:Copypaste c')
|
->delete('SkobkinCopyPasteBundle:Copypaste c')
|
||||||
->where('c.dateExpire < :now')
|
->where('c.dateExpire < :now')
|
||||||
|
->andWhere('c.dateExpire IS NOT NULL')
|
||||||
->setParameter('now', new \DateTime());
|
->setParameter('now', new \DateTime());
|
||||||
$queryBuilder->getQuery()->execute();
|
$queryBuilder->getQuery()->execute();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue