👌 Retire des commentaires sur les actions

This commit is contained in:
Shikiryu 2017-11-16 22:07:53 +01:00
parent 5b3500e193
commit 2efb54f0f8

View File

@ -68,7 +68,7 @@ if ($actions->connect()) {
if ($existing_deals[$deal->getId()]->getDateCreation()->add(new DateInterval('P1W')) <= (new DateTime())) {
// Suppression
$log->error(sprintf('elle est vieille (%s), on la supprime.', $existing_deals[$deal->getId()]->getDateCreation()->format('d/m/Y H:i')));
// $actions->delete($deal);
$actions->delete($deal);
// Backup
if (!file_exists(BACKUP_DEALS_DIR.'/'.$deal->getId())) {
mkdir(BACKUP_DEALS_DIR . '/' . $deal->getId());
@ -101,13 +101,13 @@ if ($actions->connect()) {
foreach (new DirectoryIterator(NEW_DEALS_DIR) as $new_deal) {
if ($new_deal->isDir() && !$new_deal->isDot()) {
$deal_to_create = \Shikiryu\LBCReposter\Deal::fromJSON($new_deal->getRealPath() . '/data.json');
/*if ($actions->create($deal_to_create)) {
if ($actions->create($deal_to_create)) {
delete_folder($new_deal->getRealPath());
$log->info(sprintf('L\'annonce %s a bien été créée.', $deal_to_create->getSubject()));
break;
} else {
$log->error(sprintf('L\'annonce %s n\'a pas bien été créée. %s', $deal_to_create->getSubject()));
}*/
}
sleep(30);
}
}