| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- declare(strict_types=1);
- /**
- * This file is part of Hyperf.
- *
- * @link https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact group@hyperf.io
- * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
- */
- /**
- * 多个队列名,就要创建多个 App\Process\AsyncQueue[xxxxxx]ConsumerProcess
- */
- $queuePrefix = env('APP_NAME', 'app2022') . ':' . env('SERVER_CACHE_PREFIX', 'cache2023') . 'job_queue';
- return [
- // App\Process\AsyncQueueDefaultConsumerProcess 在消费
- 'default' => [
- 'driver' => Hyperf\AsyncQueue\Driver\RedisDriver::class,
- 'redis' => [
- 'pool' => 'default',
- ],
- 'channel' => $queuePrefix,
- 'timeout' => 2,
- 'retry_seconds' => 5,
- 'handle_timeout' => 10,
- 'processes' => 1,
- 'concurrent' => [
- 'limit' => 10,
- ],
- ],
- ];
|