Commit 400392d2 authored by Mat's avatar Mat
Browse files

hop

parent c59b15b9
...@@ -41,16 +41,12 @@ class CronOffreCommand extends ContainerAwareCommand ...@@ -41,16 +41,12 @@ class CronOffreCommand extends ContainerAwareCommand
*/ */
foreach ($currentOffre as $offre) foreach ($currentOffre as $offre)
{ {
if ($offre->getEndedAt() >= $now) { if ($offre->getEndedAt() <= $now) {
//$output->writeln($offre->getReference() . ': offre toujours en cours');
}
else {
$output->writeln($offre->getReference() . ': offre expirée, on archive..'); $output->writeln($offre->getReference() . ': offre expirée, on archive..');
$offre->setStatus('closed'); $offre->setStatus('closed');
// TODO envoyer un mail au gestionnaire pour annoncer l'expiration de l'offre // TODO envoyer un mail au gestionnaire pour notifier l'expiration de l'offre
} }
} }
$em->flush(); $em->flush();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment