Laravel includes an excellent queue component that allows us to delegate time-consuming tasks to background processes. A queue worker, no matter how well optimized, can only handle one job at a time.
Each worker is a PHP process, and each process is isolated from the others by having its own memory space.
When a task is in the wait state, the process searches for other tasks to handle.
Then, we can create a worker struct and call the Work method: worker := Worker{ sqsClient: sqsClient, s3Client: s3Client, } worker.Work()