完成队列的实现

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® 商标和著作权所有者为上海顶想信息科技有限公司。 ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
更多细节参阅 [LICENSE.txt](LICENSE.txt) 更多细节参阅 [LICENSE.txt](LICENSE.txt)
php think queue:listen --queue helloJobQueue

View File

@ -10,11 +10,11 @@
// +---------------------------------------------------------------------- // +----------------------------------------------------------------------
return [ return [
'default' => 'sync', 'default' => 'database',
'connections' => [ 'connections' => [
'sync' => [ // 'sync' => [
'type' => 'sync', // 'type' => 'sync',
], // ],
'database' => [ 'database' => [
'type' => 'database', 'type' => 'database',
'queue' => 'default', 'queue' => 'default',
@ -31,9 +31,10 @@ return [
// 'timeout' => 0, // 'timeout' => 0,
// 'persistent' => false, // 'persistent' => false,
// ], // ],
// ],
// 'failed' => [
// 'type' => 'none',
// 'table' => 'failed_jobs',
], ],
'failed' => [
'type' => 'none',
'table' => 'prefix_jobs',
],
]; ];