Cron cleaning fix.

This commit is contained in:
Alexey Skobkin 2015-03-16 04:06:24 +03:00
parent a8b0f2fa0d
commit 3cf28a612f

View file

@ -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();