search([])->map(function (NamiMemberEntry $member) use ($api) { return new CompleteMemberToRedisJob($api, $member->groupId, $member->id); })->toArray(); Bus::batch($jobs) ->finally(function () { foreach (Redis::lrange('members', 0, -1) as $data) { ProcessRedisAction::dispatch(json_decode($data, true)); } }) ->onQueue('long') ->allowFailures() ->dispatch(); } public function asCommand(): int { $this->handle(app(NamiSettings::class)->login()); return 0; } }