mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-25 10:20:29 -06:00
Add some logging
This commit is contained in:
parent
af063191ab
commit
4111973a06
@ -27,6 +27,7 @@ use Exception;
|
||||
use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Console\Command;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class DeleteEmptyGroups
|
||||
@ -54,6 +55,7 @@ class DeleteEmptyGroups extends Command
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
$start = microtime(true);
|
||||
$groupIds =
|
||||
TransactionGroup
|
||||
@ -61,6 +63,7 @@ class DeleteEmptyGroups extends Command
|
||||
->whereNull('transaction_journals.id')->get(['transaction_groups.id'])->pluck('id')->toArray();
|
||||
|
||||
$total = count($groupIds);
|
||||
Log::debug(sprintf('Count is %d', $total));
|
||||
if ($total > 0) {
|
||||
$this->info(sprintf('Deleted %d empty transaction group(s).', $total));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user