异步更新数据
This commit is contained in:
@@ -8,6 +8,7 @@ use think\Db;
|
||||
use think\Log;
|
||||
use app\common\model\GiveGiftBase;
|
||||
use think\cache\driver\Redis;
|
||||
use app\api\model\GiveGift;
|
||||
|
||||
class GiftQueue
|
||||
{
|
||||
@@ -92,6 +93,7 @@ class GiftQueue
|
||||
$failed = 0;
|
||||
|
||||
$model = new GiveGiftBase();
|
||||
$gift_model = new GiveGift();
|
||||
|
||||
Log::info("开始处理送礼队列,批量大小: {$batchSize}");
|
||||
|
||||
@@ -129,6 +131,7 @@ class GiftQueue
|
||||
|
||||
if ($result) {
|
||||
$success++;
|
||||
$gift_model->change_user_give_gift_log_callback($result, $giftData);
|
||||
Log::info("送礼记录处理成功: {$uuid}, ID: {$result}");
|
||||
} else {
|
||||
$failed++;
|
||||
|
||||
Reference in New Issue
Block a user