完成队列的实现

This commit is contained in:
giaogiao 2024-03-07 19:47:35 +08:00
parent 88b0989dfe
commit 018597fe2a
2 changed files with 23 additions and 18 deletions

View File

@ -54,3 +54,7 @@ All rights reserved。
ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
更多细节参阅 [LICENSE.txt](LICENSE.txt)
php think queue:listen --queue helloJobQueue

View File

@ -10,30 +10,31 @@
// +----------------------------------------------------------------------
return [
'default' => 'sync',
'default' => 'database',
'connections' => [
'sync' => [
'type' => 'sync',
],
// 'sync' => [
// 'type' => 'sync',
// ],
'database' => [
'type' => 'database',
'queue' => 'default',
'table' => 'jobs',
'connection' => null,
],
// 'redis' => [
// 'type' => 'redis',
// 'queue' => 'default',
// 'host' => '127.0.0.1',
// 'port' => 6379,
// 'password' => '',
// 'select' => 0,
// 'timeout' => 0,
// 'persistent' => false,
// ],
],
'failed' => [
'type' => 'none',
'table' => 'prefix_jobs',
// 'redis' => [
// 'type' => 'redis',
// 'queue' => 'default',
// 'host' => '127.0.0.1',
// 'port' => 6379,
// 'password' => '',
// 'select' => 0,
// 'timeout' => 0,
// 'persistent' => false,
// ],
// ],
// 'failed' => [
// 'type' => 'none',
// 'table' => 'failed_jobs',
],
];