My code is as follows.
for($i = 0; $i <= 100; $i++) { $objUser = [ "UserName" => $request["UserName"] . $i, "EmailAddress" => $request["EmailAddress"] . $i, "RoleID" => RoleEnum::ProjectManager, "Password" => $request["Password"], ]; $RegisterResponse = $this->Register->Register($objUser); $Data = $RegisterResponse["Data"]; $job = (new AccountActivationJob($Data)); dispatch($job); }
100 users are created above the code, and every time a queue is created for sending notifications by e-mail. I use the default queue for the database.
I have a GoDaddy hosting account. For some reason, CPU usage reaches 100. Here is a screenshot.

Finally, the cycle stops between them. Below is a screenshot after 5 minutes.

Here is my problem: it cannot continue to create 100 users. I do this to test the implementation of the fetch queue when multiple users submit a registration request. Am I doing something wrong?
source share