Skip to content

Commit

Permalink
update cron
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielsolomon committed Jul 5, 2021
1 parent 391ca4c commit a11996c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
}
},
"require": {
"php": "^7.1|^8.0",
"ext-json": "*",
"bytic/orm": "^0.9|^1.0",
"bytic/mail": "^0.9|^1.0",
Expand Down
8 changes: 7 additions & 1 deletion src/Console/Commands/EmailsCleanupData.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Nip\MailModule\Console\Commands;

use Nip\Database\Result;

/**
* Class EmailsCleanupData
* @package Nip\MailModule\Console\Commands
Expand All @@ -13,7 +15,11 @@ class EmailsCleanupData extends EmailsAbstract
*/
public function handle()
{
/** @var Result $result */
$result = $this->emailsManager()->reduceOldEmailsData();
return $result->numRows();
if ($result->checkValid()) {
return $result->numRows();
}
return 0;
}
}

0 comments on commit a11996c

Please sign in to comment.