Browse Source

👌 Retire des commentaires sur les actions

master
Shikiryu 3 years ago
parent
commit
2efb54f0f8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      cron.php

+ 3
- 3
cron.php 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);
}
}


Loading…
Cancel
Save