perf(worker): 调高斗鱼任务与批次执行并发默认上限

This commit is contained in:
yml
2026-11-28 14:23:57 +08:00
parent 2013a9bdeb
commit 82f2cc21ac
11 changed files with 96 additions and 112 deletions
@@ -224,7 +224,7 @@ export default function DouyuTasksPage({
const [loading, setLoading] = useState(false);
const [runningBatchIds, setRunningBatchIds] = useState<Set<string>>(new Set());
const [configOpen, setConfigOpen] = useState(false);
const [concurrency, setConcurrency] = useState(3);
const [concurrency, setConcurrency] = useState(5);
const [goldAmount, setGoldAmount] = useState(() => savedPositiveInteger(DOUYU_GOLD_AMOUNT_STORAGE_KEY));
// 历史兑换截图默认不展示;只有本页面本次实际发起过兑换的账号才显示。
const [exchangeImageAccountIds, setExchangeImageAccountIds] = useState<Set<number>>(() => new Set());
@@ -1076,10 +1076,10 @@ export default function DouyuTasksPage({
}
// 支付码批次尽量一次全出码,队列只负责展示和等待到账,不让人工等前一个付完才生成下一个。
const batchConcurrency = DOUYU_PAYMENT_TASK_TYPE_SET.has(taskType)
? Math.min(10, Math.max(concurrency, ids.length))
? Math.min(15, Math.max(concurrency, ids.length))
: taskType === 'query_account_overview'
? Math.min(5, Math.max(concurrency, ids.length))
: Math.min(5, concurrency);
? Math.min(10, Math.max(concurrency, ids.length))
: Math.min(10, concurrency);
try {
const result = await douyuApi.createTasks({
account_ids: ids,