Merge branch 'feature/mzl_dev'
# Conflicts: # app/common/utils/email/Emails.php
This commit is contained in:
@@ -435,10 +435,11 @@ class Emails
|
||||
$channelInfo = InquiryChannel::where('id', $channel)->first();
|
||||
|
||||
// 初始化 UID 轮询器
|
||||
\app\common\utils\UidRotator::initialize([64, 63, 83, 93, 108, 118, 131, 132, 145, 150, 143, 156, 157, 158]);
|
||||
$uidRotator = new \app\common\utils\RedisUidRotator('email_parsed_result_20250804');
|
||||
$uidRotator->setUids([64, 63, 83, 93, 108, 118, 131, 132, 145, 150, 143, 156, 157, 158]);
|
||||
|
||||
EmailParsedResult::where('status', 0)
|
||||
->chunkById($batchSize, function ($records) use ($delaySeconds, $throttleAfter, $throttleSeconds, $enterUser, $channelInfo) {
|
||||
->chunkById($batchSize, function ($records) use ($delaySeconds, $throttleAfter, $throttleSeconds, $enterUser, $channelInfo, $uidRotator) {
|
||||
$count = 0;
|
||||
|
||||
foreach ($records as $record) {
|
||||
@@ -448,7 +449,7 @@ class Emails
|
||||
$countryInfo = Country::where('cn_addr', $countryName)->first();
|
||||
|
||||
// 获取下一个分配的UID
|
||||
$assignedUid = \app\common\utils\UidRotator::next();
|
||||
$assignedUid = $uidRotator->next();
|
||||
|
||||
// 获取分配的用户信息
|
||||
$recipientInfo = User::where('id', $assignedUid)->first();
|
||||
|
||||
Reference in New Issue
Block a user