调整自动分配用户ID

This commit is contained in:
mzl
2025-09-18 17:54:37 +08:00
parent b7b6edb06c
commit 8fb21de92e
+2 -2
View File
@@ -436,7 +436,7 @@ class Emails
// 初始化 UID 轮询器
$uidRotator = new \app\common\utils\RedisUidRotator('email_parsed_result_20250804');
$uidRotator->setUids([64, 63, 83, 93, 108, 132, 145, 150, 143, 156, 157, 158], false);
$uidRotator->setUids([64, 63, 93, 108, 132, 145, 150, 143, 156, 157, 158], false);
EmailParsedResult::where('status', 0)
->chunkById($batchSize, function ($records) use ($delaySeconds, $throttleAfter, $throttleSeconds, $enterUser, $channelInfo, $uidRotator) {
@@ -454,7 +454,7 @@ class Emails
// 获取分配的用户信息
$recipientInfo = User::where('id', $assignedUid)->where('status', 1)->first();
if (!$recipientInfo) {
flg("用户ID=" . $assignedUid . " 不存在或已离职跳过分配,需要手动移除 UID");
flg("用户ID=" . $assignedUid . " 已离职 跳过自动分配,需要手动移除 UID");
$assignedUid = $uidRotator->next();
$recipientInfo = User::where('id', $assignedUid)->where('status', 1)->first();