Skip to content

Commit 87fd7cd

Browse files
committed
fix: correct description text and replace manager references with ExecutorFacade
1 parent c0b0be4 commit 87fd7cd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Console/ExecuteRollbackCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Pharaonic\Laravel\Executor\Console;
44

55
use Illuminate\Console\Command;
6+
use Pharaonic\Laravel\Executor\Facades\Executor as ExecutorFacade;
67
use Pharaonic\Laravel\Executor\Models\Executor;
78

89
class ExecuteRollbackCommand extends Command
@@ -20,7 +21,7 @@ class ExecuteRollbackCommand extends Command
2021
*
2122
* @var string
2223
*/
23-
protected $description = 'Rollback the lastest executors that has been inserted.';
24+
protected $description = 'Rollback the latest executors that have been inserted.';
2425

2526
/**
2627
* Execute the console command.
@@ -37,8 +38,9 @@ public function handle()
3738
return 0;
3839
}
3940

40-
$manager = app('pharaonic.executor.manager');
41-
$items = $manager->pool->collect($manager->getRecords())->getItems();
41+
$items = ExecutorFacade::getPool()
42+
->collect(ExecutorFacade::getRecords())
43+
->getItems();
4244

4345
foreach ($items as $item) {
4446
if ($item->model && in_array($item->model->batch, $batches)) {

0 commit comments

Comments
 (0)