Cron cleaning fix.

This commit is contained in:
Alexey Skobkin 2015-03-16 04:06:24 +03:00
parent a8b0f2fa0d
commit 3cf28a612f
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class DropExpiredCopypastesCommand extends ContainerAwareCommand
$queryBuilder = $em->createQueryBuilder()
->delete('SkobkinCopyPasteBundle:Copypaste c')
->where('c.dateExpire < :now')
->andWhere('c.dateExpire IS NOT NULL')
->setParameter('now', new \DateTime());
$queryBuilder->getQuery()->execute();