first commit symfony 6
This commit is contained in:
@ -33,8 +33,6 @@ class CleanCommand extends Command
|
||||
->setName('app:Clean')
|
||||
->setDescription('Nettoyage des données obsolètes')
|
||||
->setHelp('Nettoyage des données obsolètes')
|
||||
->addArgument('cronid', InputArgument::OPTIONAL, 'ID Cron Job')
|
||||
->addArgument('lastchance', InputArgument::OPTIONAL, 'Lastchance to run the cron')
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,6 @@ class CleanRegistrationCommand extends Command
|
||||
->setName('app:CleanRegistration')
|
||||
->setDescription('Nettoyage des inscriptions obsolètes')
|
||||
->setHelp('Nettoyage des inscriptions obsolètes')
|
||||
->addArgument('cronid', InputArgument::OPTIONAL, 'ID Cron Job')
|
||||
->addArgument('lastchance', InputArgument::OPTIONAL, 'Lastchance to run the cron')
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -81,10 +81,8 @@ class CronCommand extends Command
|
||||
// Réccuépration des parametres
|
||||
$jsonparameter=json_decode($cron->getJsonargument(),true);
|
||||
|
||||
// Parametre id du cron actuel
|
||||
$jsonparameter["cronid"]=$cron->getId();
|
||||
|
||||
// Formater la chaine de parametre
|
||||
if(!$jsonparameter) $jsonparameter=[];
|
||||
$parameter = new ArrayInput($jsonparameter);
|
||||
|
||||
// Executer la commande
|
||||
|
@ -95,6 +95,10 @@ class SynchroCommand extends Command
|
||||
case "NINE2NINE":
|
||||
$return=$this->nine2nine();
|
||||
break;
|
||||
|
||||
default:
|
||||
$return=Command::SUCCESS;
|
||||
break;
|
||||
}
|
||||
|
||||
$this->writeln('');
|
||||
|
@ -43,8 +43,7 @@ class CronRepository extends ServiceEntityRepository
|
||||
$now=new \DateTime();
|
||||
|
||||
$qb = $this->createQueryBuilder('cron')
|
||||
->Where('cron.statut=0')
|
||||
->orWhere('(cron.statut=0 OR cron.statut=1) AND cron.nextexecdate<:now');
|
||||
->Where('(cron.statut=0 OR cron.statut=1) AND cron.nextexecdate<:now');
|
||||
|
||||
return $qb->getQuery()->setParameter('now',$now->format("Y-m-d H:i:s"))->getResult();
|
||||
}
|
||||
|
Reference in New Issue
Block a user