修复随机号码前先按权重随机工单,并修复降权号码筛选与清理

This commit is contained in:
root
2026-07-04 22:09:39 +08:00
parent 9b57b0c400
commit 6b72cd7b67
37 changed files with 2201 additions and 473 deletions
@@ -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;