修复随机号码前先按权重随机工单,并修复降权号码筛选与清理
This commit is contained in:
@@ -42,6 +42,20 @@ class SplitNodeHealthService
|
||||
*/
|
||||
public static function canAcceptWork(): bool
|
||||
{
|
||||
return self::canAcceptWorkForTicketType('');
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定工单类型是否可向 Node 提交新任务
|
||||
*
|
||||
* API 优先类型(如 Whatshub)常态不占 Real Browser,调度层应跳过队列门禁。
|
||||
*/
|
||||
public static function canAcceptWorkForTicketType(string $ticketType): bool
|
||||
{
|
||||
if ($ticketType !== '' && SplitScrmSpiderFactory::isApiFirstSyncType($ticketType)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$stats = self::fetchStats();
|
||||
if ($stats === null) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user