swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.03k stars 388 forks source link

Run Laravel schedule with Swoole #524

Open videni opened 2 years ago

videni commented 2 years ago

Any guys try to run Laravel schedule with Swoole please? You know the schedule:run would run very job inside isolated process, which is not not practical, because I got 50,000 jobs to run. So I am wondering if we can run each job with Swoole Coroutine

Here are steps what I am going to do:

  1. Start Laravel console Kernel
  2. Run job with Coroutine instead of process.
  3. Use the Swoole timer to drive Laravel schedule

Any ideas will be appreciated.

mRamadan0101 commented 2 years ago

jobs are in difference times ?