search([])->map(function (NamiMember $member) use ($api) { return new CompleteMemberToRedisJob($api, $member->groupId, $member->id); })->toArray(); $batch = Bus::batch($jobs) ->finally(function (Batch $batch) { dd(Redis::get('members')); }) ->dispatch(); // $localMember = InsertMemberAction::run(); // })->catch(function (Batch $batch, Throwable $e) { // // First batch job failure detected... // })->finally(function (Batch $batch) { // // The batch has finished executing... // }) // app(PullMembershipsAction::class)->handle($localMember); // app(PullCoursesAction::class)->handle($localMember); } public function restore(): void { DB::table('payments')->delete(); DB::table('course_members')->delete(); DB::table('memberships')->delete(); DB::table('members')->delete(); } public function asCommand(Command $command): int { $this->handle(app(NamiSettings::class)->login()); return 0; } }