Laravel在许多对象调度作业上的长循环超时。

I have 500 users. I have to run through them all and assign different things, send them an email...

For each user I am sending a email, handling some api items. This call is timing out after 30 seconds.

I am on Forge and so I have a redis working running. I am very unfamiliar with queue'ing jobs and stuff like that so forgive the noob.

My handle() function in the job is:

public function handle()
{
    Log::info('hit the job');
// assign something
// hit an api and add something to the user
// send the user and email
// save user      

}

I am calling this from a controller:

 public function activateCohort(Request $request, $id)
{
    // Get some stuff

    foreach($users as $u){
         // do something 

            ProcessActivation::dispatch($u);    
    }


    // save some stuff


    return redirect()->back()->with('message-success', 'message');
}

This all runs fine. But it only goes through about 50 users. In the future I need this to work for 1k, 2k, 5k users.

I am also not sure how to see how redis is doing.

I am at a loss for how to structure the call to work. Any help is greatly appreciated.