{"id":28707,"date":"2026-11-28T07:55:02","date_gmt":"2026-11-28T07:55:02","guid":{"rendered":"https:\/\/capskip.com\/?p=28707"},"modified":"2026-11-28T07:55:02","modified_gmt":"2026-11-28T07:55:02","slug":"p-queue-captcha-nodejs","status":"publish","type":"post","link":"https:\/\/capskip.com\/zh\/p-queue-captcha-nodejs\/","title":{"rendered":"Node.js \u4e2d\u7684 p-queue \u9a8c\u8bc1\u7801\u8bc6\u522b\uff1a\u5e76\u53d1\u6570\u4e0e\u8d85\u65f6"},"content":{"rendered":"<p>\u5bf9\u4e8e Node.js \u4e2d\u7684 p-queue \u9a8c\u8bc1\u7801\u4f5c\u4e1a\uff0c\u521b\u5efa\u961f\u5217\u65f6\u8ba9\u5e76\u53d1\u6570\u4ece CapSkip \u91cc\u7684 Max. Threads \u503c\u5f00\u59cb\uff0c\u5728\u6bcf\u4e2a\u6392\u961f\u7684\u4f5c\u4e1a\u91cc\u8c03\u7528 solver.recaptcha()\uff0c\u5e76\u5728\u540c\u4e00\u4e2a\u4f5c\u4e1a\u91cc\u63d0\u4ea4\u8868\u5355\uff0c\u8fd9\u6837\u6bcf\u4e2a token \u5728\u8bc6\u522b\u51fa\u6765\u4e4b\u540e\u7acb\u523b\u5c31\u88ab\u4f7f\u7528\u3002\u672c\u6307\u5357\u7684\u5927\u90e8\u5206\u5185\u5bb9\u8bb2\u7684\u662f\u56f4\u7ed5\u5b83\u4f1a\u51fa\u4ec0\u4e48\u95ee\u9898\uff1a\u4e24\u4e2a\u8d70\u4e0d\u540c\u65f6\u949f\u7684\u8d85\u65f6\u3001\u4e00\u4e2a\u4f1a\u5fd8\u8bb0\u5b83\u5df2\u653e\u5f03\u7684\u8bc6\u522b\u7684\u961f\u5217\uff0c\u4ee5\u53ca\u4e00\u4e2a\u4f1a\u8ba9\u8fdb\u7a0b\u7ed3\u675f\u7684\u88ab\u62d2\u7edd\u7684\u4f5c\u4e1a\u3002 <a href=\"https:\/\/capskip.com\/zh\/nodejs-captcha-solver\/\">CapSkip Node.js \u9a8c\u8bc1\u7801\u8bc6\u522b\u5de5\u5177<\/a> \u5728\u4f60\u81ea\u5df1\u7684 Windows PC \u4e0a\u5b8c\u6210\u8bc6\u522b\uff0c\u6bcf\u6b21\u8bc6\u522b\u4e0d\u6536\u8d39\u3002<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">\u4f60\u9700\u8981\u4ec0\u4e48<\/h2>\n<ul>\n<li>\u4e00\u53f0\u8fd0\u884c\u7740 CapSkip \u7684 Windows \u673a\u5668\uff0c\u624b\u8fb9\u5907\u6709\u5b83 reCAPTCHA \u884c\u7684 Max. Threads \u503c\u3002<\/li>\n<li>Node.js 22 \u6216\u66f4\u65b0\u7248\u672c\uff1ap-queue 10.0.0 \u7684 engines \u5b57\u6bb5\u5199\u7684\u662f 22\uff0ccapskip 1.8.0 \u7684\u5199\u7684\u662f 18\u3002\u6211\u5728 24.22.0 \u548c 25.2.1 \u4e0a\u8fd0\u884c\u4e86\u811a\u672c\uff0c\u4ece\u672a\u5728 22 \u672c\u8eab\u4e0a\u8fd0\u884c\u8fc7\u3002<\/li>\n<li>\u4e00\u4e2a\u5e26\u6709 reCAPTCHA v2 \u8868\u5355\u3001\u4f60\u6709\u6743\u81ea\u52a8\u5316\u7684\u9875\u9762\u3002 <a href=\"https:\/\/capskip.com\/zh\/recaptcha-v2-nodejs\/\">Node.js \u7684 reCAPTCHA v2 \u6307\u5357<\/a> \u5c55\u793a\u4e86\u5b83\u7684 sitekey \u5728\u9875\u9762\u4e2d\u7684\u4ec0\u4e48\u4f4d\u7f6e\u3002<\/li>\n<li>\u4e00\u4e2a\u8fde\u5230 CapSkip \u7684\u65b9\u5f0f\u3002Local mode \u628a API \u4fdd\u6301\u5728 127.0.0.1 \u4e0a\uff0c\u800c Server mode \u8ba9\u5176\u4ed6\u673a\u5668\u8c03\u7528\u5b83\u3002 <a href=\"https:\/\/capskip.com\/zh\/setup-guide\/#connection-settings\">\u8bbe\u7f6e\u6307\u5357<\/a> \u5728 Connection Settings \u4e0b\u89e3\u91ca\u4e86\u4e24\u8005\u3002<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u7684\u6570\u5b57\u662f\u9488\u5bf9\u6211\u5199\u7684\u4e24\u4e2a\u5c0f\u670d\u52a1\u5668\u6d4b\u5f97\u7684\uff0c\u4e00\u4e2a\u4ee3\u66ff CapSkip API\uff0c\u4e00\u4e2a\u4ee3\u66ff\u6ce8\u518c\u7ad9\u70b9\uff0c\u6240\u4ee5\u7ad9\u70b9\u89c4\u5219\u662f\u6211\u81ea\u5df1\u7684\u3002\u8fd0\u884c\u7528\u7684\u662f Windows 11 \u4e0a\u7684 Node.js 24.22.0\u3001capskip 1.8.0 \u548c p-queue 10.0.0\u3002\u6a21\u62df\u670d\u52a1\u5728 2 \u5230 4 \u79d2\u5185\u5b8c\u6210\u8bc6\u522b\uff0c\u6bd4\u771f\u5b9e\u7684 reCAPTCHA \u8bc6\u522b\u5feb\u5f97\u591a\uff0c\u6240\u4ee5\u8bf7\u628a\u8fd9\u4e9b\u6570\u5b57\u5f53\u4f5c\u5f62\u6001\u6765\u8bfb\u3002\u771f\u5b9e\u5e94\u7528\u5728\u8fd9\u53f0 PC \u4e0a\u6ca1\u6709\u5e94\u7b54\uff0c\u6240\u4ee5\u6211\u6ca1\u6709\u5411\u5b83\u53d1\u9001\u4efb\u4f55\u4e1c\u897f\u3002\u4f9d\u636e\u8bbe\u7f6e\u6307\u5357\u6216\u5305\u6e90\u7801\u7684\u8bf4\u6cd5\u90fd\u6709\u6807\u6ce8\u3002<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">\u7b2c 1 \u6b65\uff1a\u5b89\u88c5\u4e24\u4e2a\u5305\u5e76\u5bfc\u5165\u5b83\u4eec<\/h2>\n<p>capskip \u5305\u662f CommonJS\uff0cp-queue 10 \u53ea\u6709 ES modules\uff0c\u8fd9\u51b3\u5b9a\u4e86\u6bcf\u4e2a\u6587\u4ef6\u5982\u4f55\u5bfc\u5165\u5b83\u4eec\u3002\u5728 package.json \u7684 type \u8bbe\u4e3a module \u7684\u9879\u76ee\u91cc\uff0c\u666e\u901a\u7684 import \u8bed\u53e5\u5bf9\u4e24\u8005\u90fd\u6709\u6548\u3002\u5728\u4e00\u4e2a\u7a7a\u6587\u4ef6\u5939\u91cc\u8fd0\u884c\u7b2c\u4e00\u4e2a\u4ee3\u7801\u5757\u3002<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"bash\" class=\"EnlighterJSRAW\"># Run in an empty folder, in PowerShell\nnpm init -y\nnpm pkg set type=module\nnpm install capskip p-queue<\/pre>\n<\/div>\n<p>\u6211\u5728\u4e09\u4e2a Node.js \u7248\u672c\u4e0a\u8fd0\u884c\u4e86\u8fd9\u4e9b\uff0c\u65e2\u5728\u90a3\u4e2a\u9879\u76ee\u91cc\uff0c\u4e5f\u5728\u7528 npm init -y \u521b\u5efa\u7684\u7b2c\u4e8c\u4e2a\u9879\u76ee\u91cc\uff0c\u540e\u8005\u5199\u5165 type commonjs\u300220.11.1 \u4f4e\u4e8e p-queue \u7684\u6700\u4f4e\u8981\u6c42\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u4f4d\u7f6e\u548c\u5185\u5bb9<\/th>\n<th>20.11.1<\/th>\n<th>24.22.0 \u548c 25.2.1<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>module \u9879\u76ee\uff0cimport capskip \u548c p-queue<\/td>\n<td>\u53ef\u7528<\/td>\n<td>\u53ef\u7528<\/td>\n<\/tr>\n<tr>\n<td>CommonJS \u9879\u76ee\uff0crequire p-queue<\/td>\n<td>ERR_REQUIRE_ESM<\/td>\n<td>\u80fd\u52a0\u8f7d\uff0c\u4f46\u5f97\u5230\u7684\u662f\u547d\u540d\u7a7a\u95f4\u5bf9\u8c61\uff0c\u6240\u4ee5 new \u4f1a\u5931\u8d25\uff0c\u62a5 &quot;not a constructor&quot;<\/td>\n<\/tr>\n<tr>\n<td>CommonJS \u9879\u76ee\uff0cimport() p-queue<\/td>\n<td>\u53ef\u7528<\/td>\n<td>\u53ef\u7528<\/td>\n<\/tr>\n<tr>\n<td>type \u4e3a commonjs \u7684 CommonJS \u9879\u76ee\uff0c.js \u6587\u4ef6\u91cc\u7684 import \u8bed\u53e5<\/td>\n<td>SyntaxError<\/td>\n<td>SyntaxError<\/td>\n<\/tr>\n<tr>\n<td>module \u9879\u76ee\uff0crequire capskip<\/td>\n<td>ReferenceError<\/td>\n<td>ReferenceError<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ca1\u6709 type \u5b57\u6bb5\u65f6\uff0cNode.js 24 \u548c 25 \u628a\u90a3\u884c import \u5f53\u4f5c\u6a21\u5757\u8fd0\u884c\uff0c\u5e76\u7ed9\u51fa\u4e00\u4e2a\u8b66\u544a\u3002\u6240\u4ee5 CommonJS \u6587\u4ef6\u8981\u5728\u4e00\u4e2a\u5f02\u6b65\u51fd\u6570\u91cc\u7528 import() \u52a0\u8f7d p-queue\uff0c\u5982\u4e0b\u6240\u793a\uff0c\u5b83\u5728\u4e09\u4e2a\u7248\u672c\u4e0a\u90fd\u6253\u5370 function 2\u3002<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\/\/ queue_check.cjs\n\/\/ The same two packages in a CommonJS project, one without &quot;type&quot;: &quot;module&quot;.\nconst { CapSkip } = require(&quot;capskip&quot;);\n\nasync function main() {\n  \/\/ p-queue 10 is ESM only, so a CommonJS file loads it with import().\n  const { default: PQueue } = await import(&quot;p-queue&quot;);\n  const queue = new PQueue({ concurrency: 2 });\n  const solver = new CapSkip({ host: &quot;127.0.0.1&quot;, port: 8080 });\n  console.log(typeof solver.recaptcha, queue.concurrency);\n}\n\nmain();<\/pre>\n<\/div>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">\u7b2c 2 \u6b65\uff1a\u7f16\u5199\u4f5c\u4e1a\u548c\u961f\u5217<\/h2>\n<p>\u628a\u63a5\u4e0b\u6765\u7684\u4e09\u4e2a\u4ee3\u7801\u5757\u6309\u987a\u5e8f\u4fdd\u5b58\u4e3a\u540c\u4e00\u4e2a\u6587\u4ef6 queue_solve.mjs\uff0c\u653e\u5728\u7b2c 1 \u6b65\u7684\u6587\u4ef6\u5939\u91cc\uff0c\u7528\u4f60\u81ea\u5df1\u7684 URL \u548c sitekey\u3002\u9876\u90e8\u7684\u5e38\u91cf\u627f\u8f7d\u4e86\u4e3b\u8981\u7684\u6559\u8bad\uff1acapskip \u6309\u79d2\u8ba1\u6570\uff0cp-queue \u6309\u6beb\u79d2\u8ba1\u6570\uff0c\u800c\u8fd9\u4e24\u4e2a\u8d85\u65f6\u5728\u4e0d\u540c\u7684\u65f6\u523b\u5f00\u59cb\u8ba1\u65f6\u3002SDK_TIMEOUT \u662f 300\uff0c\u8fd9\u662f capskip \u5bf9 recaptcha() \u7684\u9ed8\u8ba4\u503c\uff0c\u56e0\u4e3a\u8bbe\u7f6e\u6307\u5357\u628a reCAPTCHA \u884c\u7684 Row Timeout \u5b9a\u4e3a 250 \u79d2\uff0c\u518d\u52a0\u4e0a\u6392\u961f\u65f6\u95f4\u3002<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\/\/ queue_solve.mjs\n\/\/ npm install capskip p-queue\nimport PQueue, { TimeoutError } from &quot;p-queue&quot;;\nimport {\n  CapSkip, ApiException, NetworkException, TimeoutException, ValidationException,\n} from &quot;capskip&quot;;\n\nconst PAGE_URL = &quot;https:\/\/example.com\/signup&quot;; \/\/ the page that shows the widget\nconst POST_URL = &quot;https:\/\/example.com\/api\/signup&quot;; \/\/ where its form sends the answer\nconst SITEKEY = &quot;YOUR_SITEKEY&quot;;\n\nconst MAX_THREADS = 3; \/\/ the Max. Threads value of the reCAPTCHA row in CapSkip\nconst SDK_TIMEOUT = 300; \/\/ capskip: seconds, counted from the moment CapSkip accepts the task\nconst POLL = 5; \/\/ capskip: the longest pause between two polls, in seconds\n\n\/\/ p-queue: milliseconds, counted from the moment the job starts running. capskip\n\/\/ checks its deadline only at a poll, so it can end up to POLL seconds late.\n\/\/ Give p-queue that much room and a margin, so the SDK gives up first.\nconst JOB_TIMEOUT = (SDK_TIMEOUT + POLL + 5) * 1000;\n\n\/\/ Local mode. In Server mode, use the address of the PC that runs CapSkip.\nconst solver = new CapSkip({ host: &quot;127.0.0.1&quot;, port: 8080 });\n\nconst t0 = Date.now();\nconst secs = () =&gt; ((Date.now() - t0) \/ 1000).toFixed(1);<\/pre>\n<\/div>\n<p>\u4e00\u4e2a\u4f5c\u4e1a\u5c31\u662f\u4e00\u6b21\u5168\u65b0\u7684\u8bc6\u522b\u52a0\u4e00\u6b21\u8868\u5355 POST \u8bf7\u6c42\uff0c\u56e0\u4e3a token \u53ea\u80fd\u7528\u4e00\u6b21\u3002fetch \u65e2\u4e0d\u53d1\u9001 Referer \u4e5f\u4e0d\u53d1\u9001 Origin\uff0c\u6240\u4ee5\u4f5c\u4e1a\u628a\u4e24\u8005\u90fd\u8bbe\u4e0a\uff0c\u56e0\u4e3a\u4f60\u7ad9\u70b9\u4e0a\u7684 CSRF \u68c0\u67e5\u53ef\u80fd\u9700\u8981\u5b83\u4eec\u3002<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">\/\/ One job: one fresh solve, then one form post that carries that token.\nasync function signUp(email, signal) {\n  const started = secs();\n  const result = await solver.recaptcha(SITEKEY, PAGE_URL, {\n    timeout: SDK_TIMEOUT,\n    polling_interval: POLL,\n  });\n  const res = await fetch(POST_URL, {\n    method: &quot;POST&quot;,\n    \/\/ fetch sends neither header by itself, and a CSRF check may want both.\n    headers: { Referer: PAGE_URL, Origin: new URL(PAGE_URL).origin },\n    body: new URLSearchParams({ email, &quot;g-recaptcha-response&quot;: result.code }),\n    \/\/ If the queue gave up on this job while the solve ran, the signal is\n    \/\/ aborted and fetch rejects at once, so the token is not spent.\n    signal,\n  });\n  if (!res.ok) throw new Error(`the site answered HTTP ${res.status}`);\n  return `started ${started} s, finished ${secs()} s`;\n}\n\nfunction describe(err) {\n  if (err instanceof TimeoutError) return `p-queue gave up: ${err.message}`;\n  if (err instanceof TimeoutException) return `capskip stopped polling: ${err.message}`;\n  if (err instanceof ValidationException) return `refused before sending: ${err.message}`;\n  if (err instanceof NetworkException) return `CapSkip not reachable: ${err.message}`;\n  if (err instanceof ApiException) return `CapSkip answered an error: ${err.message}`;\n  return err instanceof Error ? err.message : String(err);\n}<\/pre>\n<\/div>\n<p>\u4e0b\u9762\u7684\u5faa\u73af\u5728\u6bcf\u6b21 add \u4e4b\u524d\u7b49\u5f85 onSizeLessThan\uff0c\u5e76\u4e14\u5f53\u573a\u5904\u7406\u6bcf\u4e00\u6b21\u62d2\u7edd\uff0c\u56e0\u4e3a\u4f5c\u4e1a\u5931\u8d25\u65f6 add \u8fd4\u56de\u7684 promise \u4f1a reject\u3002\u7528 node queue_solve.mjs \u8fd0\u884c\u5b83\u3002\u5b83\u4e3a\u6bcf\u4e2a\u90ae\u7bb1\u6253\u5370\u4e00\u884c\uff0c\u6700\u540e\u4e00\u884c\u662f\u961f\u5217\u8ba1\u6570\u5668\u3002<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"js\" class=\"EnlighterJSRAW\">const queue = new PQueue({ concurrency: MAX_THREADS, timeout: JOB_TIMEOUT });\n\n\/\/ Ctrl+C aborts this controller. Jobs still waiting are dropped without a solve.\nconst stop = new AbortController();\nprocess.once(&quot;SIGINT&quot;, () =&gt; stop.abort(new Error(&quot;stopped with Ctrl+C&quot;)));\n\nconst emails = Array.from({ length: 12 }, (_, i) =&gt; `user${i + 1}@example.com`);\nconst lines = [];\nlet failed = 0;\n\nfor (const email of emails) {\n  if (stop.signal.aborted) break;\n  \/\/ Backpressure: wait here while six jobs are already waiting for a thread.\n  await queue.onSizeLessThan(MAX_THREADS * 2);\n  \/\/ Handle the rejection on the spot. A bare queue.add() that fails later is an\n  \/\/ unhandled rejection, and Node ends the process on one.\n  lines.push(\n    queue\n      .add(({ signal }) =&gt; signUp(email, signal), { signal: stop.signal })\n      .then((text) =&gt; `ok   ${email} ${text}`)\n      .catch((err) =&gt; {\n        failed += 1;\n        return `FAIL ${email} ${describe(err)}`;\n      }),\n  );\n}\n\n(await Promise.all(lines)).forEach((line) =&gt; console.log(line));\nconsole.log(`${queue.size} waiting, ${queue.pending} running, ${secs()} s in all`);\nprocess.exitCode = failed === 0 ? 0 : 1;<\/pre>\n<\/div>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">p-queue \u9a8c\u8bc1\u7801\u961f\u5217\u5e94\u8be5\u540c\u65f6\u8fd0\u884c\u591a\u5c11\u4e2a\u4f5c\u4e1a\uff1f<\/h2>\n<p>\u6839\u636e\u8bbe\u7f6e\u6307\u5357\uff0cMax. Threads \u662f CapSkip \u540c\u65f6\u8bc6\u522b\u7684\u540c\u7c7b\u578b\u4efb\u52a1\u6570\u91cf\uff0c\u5176\u4f59\u7684\u5728\u5e94\u7528\u5185\u90e8\u7684\u961f\u5217\u91cc\u7b49\u5f85\u3002\u6211\u7684\u6a21\u62df\u670d\u52a1\u9075\u5faa\u8fd9\u4e00\u70b9\uff1a\u8d85\u51fa\u9650\u5236\u7684\u4efb\u52a1\u5728\u5e94\u7528\u63a5\u53d7\u5b83\u4e4b\u540e\u7b49\u5f85\u3002\u771f\u5b9e\u5e94\u7528\u5728\u8d1f\u8f7d\u4e0b\u662f\u5426\u4f1a\u7acb\u523b\u5e94\u7b54\u63d0\u4ea4\u8c03\u7528\uff0c\u6211\u6ca1\u80fd\u6d4b\u8bd5\u3002\u8fd9\u4e9b\u8fd0\u884c\u4f7f\u7528\u4e86\u4e09\u4e2a\u7ebf\u7a0b\u30012.0 \u79d2\u7684\u8bc6\u522b\u300112 \u4e2a\u4f5c\u4e1a\uff0c\u4ee5\u53ca\u4e00\u4e2a\u4ece\u672a\u89e6\u53ca\u7684 capskip \u8d85\u65f6\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u961f\u5217\u5e76\u53d1\u6570<\/th>\n<th>\u5168\u90e8 12 \u4e2a\u4f5c\u4e1a\uff0cpolling_interval 5<\/th>\n<th>polling_interval 1<\/th>\n<th>\u6a21\u62df\u670d\u52a1\u5185\u90e8\u7b49\u5f85\u7684\u4efb\u52a1\u6700\u591a\u65f6<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>45.6 \u79d2<\/td>\n<td>33.6 \u79d2<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>15.2 \u79d2<\/td>\n<td>11.2 \u79d2<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>11.4 \u79d2<\/td>\n<td>8.7 s<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>12.8 \u79d2<\/td>\n<td>8.9 s<\/td>\n<td>9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8d85\u8fc7 Max. Threads \u4ece\u672a\u8ba9\u540c\u65f6\u8fdb\u884c\u7684\u8bc6\u522b\u8d85\u8fc7\u4e09\u4e2a\u3002\u4f46\u662f\u591a\u51e0\u4e2a\u4f5c\u4e1a\u786e\u5b9e\u6709\u5e2e\u52a9\uff0c\u539f\u56e0\u5728 SDK\u3002\u6309\u5176\u6e90\u7801\uff0ccapskip \u5728 0.25 \u79d2\u540e\u8f6e\u8be2\uff0c\u5e76\u628a\u95f4\u9694\u52a0\u500d\u76f4\u5230 polling_interval\uff0c\u6240\u4ee5\u4f5c\u4e1a\u53d1\u73b0\u8bc6\u522b\u5b8c\u6210\u5f97\u665a\uff1a\u4e00\u6b21 2.0 \u79d2\u7684\u8bc6\u522b\uff0c\u5728\u9ed8\u8ba4\u503c 5 \u65f6\u5360\u7740\u5b83\u7684\u961f\u5217\u4f4d\u7f6e 3.8 \u79d2\uff0c\u5728 1 \u65f6\u5360 2.8 \u79d2\u3002\u5e76\u53d1\u4e3a 3 \u65f6\uff0c\u6a21\u62df\u670d\u52a1\u7684\u7ebf\u7a0b\u5c31\u5728\u8fd9\u4e2a\u7a7a\u6863\u91cc\u95f2\u7740\u3002\u591a\u51fa\u6765\u7684\u4f5c\u4e1a\u5728 CapSkip \u5185\u90e8\u7b49\u5f85\uff0c\u5b83\u4eec\u7684 capskip \u65f6\u949f\u5728\u8d70\uff0c\u6b63\u5982\u4e0b\u4e00\u8282\u6240\u793a\uff0c\u5e94\u7528\u7684 Wait Timeout \u4e5f\u53ef\u80fd\u628a\u5b83\u4eec\u7ec8\u7ed3\u3002\u6240\u4ee5\u4ece Max. Threads \u5f00\u59cb\uff0c\u8c03\u4f4e polling_interval\uff0c\u53ea\u6709\u5f53 Monitor \u6807\u7b7e\u9875\u663e\u793a\u6709\u7a7a\u95f2\u7ebf\u7a0b\u65f6\u624d\u589e\u52a0\u4f5c\u4e1a\u3002<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">\u4e24\u4e2a\u8d85\u65f6\uff0c\u4e24\u4e2a\u65f6\u949f<\/h2>\n<p>capskip \u7684\u65f6\u949f\u4ece CapSkip \u63a5\u53d7\u4efb\u52a1\u65f6\u5f00\u59cb\uff0c\u800c\u4e0d\u662f\u4ece\u5b83\u5f00\u59cb\u8bc6\u522b\u65f6\u5f00\u59cb\u3002\u5728\u6e90\u7801\u91cc\uff0csolve \u53d1\u9001\u4efb\u52a1\uff0c\u7136\u540e waitResult \u8bbe\u7f6e\u5b83\u7684\u622a\u6b62\u65f6\u95f4\uff0c\u5faa\u73af\u53ea\u5728\u8f6e\u8be2\u65f6\u68c0\u67e5\u8fd9\u4e2a\u622a\u6b62\u65f6\u95f4\u3002p-queue \u7684\u65f6\u949f\u4ece\u4f5c\u4e1a\u5f00\u59cb\u8fd0\u884c\u65f6\u5f00\u59cb\uff0c\u6392\u961f\u65f6\u95f4\u4e0d\u8ba1\u7b97\u5728\u5185\uff0cp-queue \u7684 README \u5199\u660e\u4e86\u8fd9\u4e00\u70b9\u3002\u8fd9\u4e9b\u884c\u662f\u6a21\u62df\u670d\u52a1\u7684\u7ed3\u679c\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u8bbe\u7f6e<\/th>\n<th>\u53d1\u751f\u4e86\u4ec0\u4e48<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>capskip \u8d85\u65f6 3\uff0cpolling_interval 1\uff0c\u8bc6\u522b 2.0 \u79d2\uff0c3 \u4e2a\u7ebf\u7a0b\uff0c\u5e76\u53d1\u6570 3\uff0c6 \u4e2a\u4f5c\u4e1a<\/td>\n<td>\u516d\u4e2a\u5168\u90e8\u5b8c\u6210\uff0c\u603b\u5171 5.6 \u79d2<\/td>\n<\/tr>\n<tr>\n<td>\u540c\u6837\uff0c\u5e76\u53d1\u6570\u4e3a 6<\/td>\n<td>\u4e09\u4e2a\u5728 2.8 \u79d2\u5b8c\u6210\u3002\u53e6\u5916\u4e09\u4e2a\u5728 3.8 \u79d2\u4ee5 TimeoutException \u7ed3\u675f\uff0c\u5185\u5bb9\u4e3a &quot;timeout 3 exceeded&quot;\uff0c\u6b64\u65f6\u5b83\u4eec\u7684\u8bc6\u522b\u4ecd\u5728\u8fdb\u884c\uff1a\u6a21\u62df\u670d\u52a1\u5b8c\u6210\u4e86\u5168\u90e8 6 \u6b21\u8bc6\u522b\uff0c3 \u4e2a\u7ed3\u679c\u4ece\u672a\u88ab\u8bfb\u53d6<\/td>\n<\/tr>\n<tr>\n<td>p-queue \u8d85\u65f6 3000 ms\uff0c\u5e76\u53d1\u6570 1\uff0c3 \u4e2a\u4f5c\u4e1a\uff0c\u8bc6\u522b 2.0 \u79d2\uff0cpolling_interval 1<\/td>\n<td>\u4e09\u4e2a\u5168\u90e8\u5b8c\u6210\uff0c\u5206\u522b\u5728 2.8\u30015.6 \u548c 8.4 \u79d2\uff0c\u5c3d\u7ba1\u8d85\u65f6\u662f 3.0 \u79d2<\/td>\n<\/tr>\n<tr>\n<td>p-queue \u8d85\u65f6 2000 ms\uff0c\u8bc6\u522b 4.0 \u79d2\uff0c2 \u4e2a\u7ebf\u7a0b\uff0c\u5e76\u53d1\u6570 2\uff0c6 \u4e2a\u4f5c\u4e1a<\/td>\n<td>\u516d\u4e2a\u5168\u90e8\u4ee5 TimeoutError \u88ab\u62d2\u7edd\uff0c\u811a\u672c\u7684\u6700\u540e\u4e00\u884c\u51fa\u73b0\u5728 6.0 \u79d2<\/td>\n<\/tr>\n<tr>\n<td>capskip \u8d85\u65f6 2\uff0cpolling_interval 1\uff0c\u5176\u4f59\u540c\u4e0a\u4e00\u884c<\/td>\n<td>\u516d\u4e2a\u5168\u90e8\u4ee5 TimeoutException \u88ab\u62d2\u7edd\uff0c\u811a\u672c\u7684\u6700\u540e\u4e00\u884c\u51fa\u73b0\u5728 8.4 \u79d2<\/td>\n<\/tr>\n<tr>\n<td>capskip \u8d85\u65f6 10\uff0cpolling_interval 1\uff0cp-queue \u8d85\u65f6 16 \u79d2\uff08\u6309\u811a\u672c\u91cc\u7684\u516c\u5f0f\uff09\uff0c\u5176\u4f59\u540c\u4e0a<\/td>\n<td>\u516d\u4e2a\u5168\u90e8\u5728\u5927\u7ea6 14.5 \u79d2\u5185\u5b8c\u6210<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7b2c\u4e8c\u884c\u662f capskip \u7684\u65f6\u949f\uff1a\u5728\u6a21\u62df\u670d\u52a1\u5185\u90e8\u7b49\u5f85\u7684\u4e09\u4e2a\u4f5c\u4e1a\u8d85\u65f6\u4e86\u3002\u7b2c\u4e09\u884c\u662f p-queue \u7684\u65f6\u949f\uff1a\u6700\u540e\u4e00\u4e2a\u4f5c\u4e1a\u5b8c\u6210\u7684\u65f6\u95f4\u8fdc\u8fdc\u8d85\u8fc7\u5b83\u7684\u8d85\u65f6\uff0c\u56e0\u4e3a\u5b83\u628a\u5927\u90e8\u5206\u8d85\u65f6\u65f6\u95f4\u90fd\u82b1\u5728\u7b49\u5f85\u4e0a\u3002\u7b2c\u56db\u884c\u548c\u7b2c\u4e94\u884c\u5c31\u662f\u9677\u9631\u3002\u4efb\u4f55\u4e00\u79cd\u8d85\u65f6\u90fd\u4f1a\u91ca\u653e\u961f\u5217\u4f4d\u7f6e\uff0c\u5374\u5bf9\u8bc6\u522b\u6beb\u65e0\u4f5c\u7528\u3002SDK \u6ca1\u6709\u53d6\u6d88\u4efb\u52a1\u7684\u8c03\u7528\uff0cp-queue \u4e5f\u8bf4\uff0c\u8d85\u65f6\u7684\u4f5c\u4e1a\u4f1a\u7ee7\u7eed\u8fd0\u884c\uff0c\u9664\u975e\u5b83\u5904\u7406\u81ea\u5df1\u7684\u4fe1\u53f7\u3002\u6240\u4ee5\u4e0b\u4e00\u4e2a\u4f5c\u4e1a\u4f1a\u4ea4\u7ed9\u4e00\u4e2a\u4ecd\u5728\u5fd9\u4e8e\u5904\u7406\u88ab\u653e\u5f03\u4efb\u52a1\u7684 CapSkip\uff0c\u800c\u961f\u5217\u8ba1\u6570\u5668\u770b\u4e0d\u5230\u8fd9\u4e00\u70b9\uff1a\u5f53\u4f7f\u7528\u8f83\u77ed p-queue \u8d85\u65f6\u7684\u90a3\u6b21\u8fd0\u884c\u5728 6.0 \u79d2\u6253\u5370\u51fa 0 \u4e2a\u7b49\u5f85\u548c 0 \u4e2a\u8fd0\u884c\u65f6\uff0c\u6a21\u62df\u670d\u52a1\u4ecd\u6709 2 \u4e2a\u8bc6\u522b\u5728\u8fd0\u884c\u30012 \u4e2a\u5728\u7b49\u5f85\uff0c\u800c onIdle \u6070\u597d\u5728\u90a3\u4e00\u523b resolve \u4e86\u3002<\/p>\n<p>\u5f53 p-queue \u5148\u653e\u5f03\u65f6\uff0cSDK \u5728\u540e\u53f0\u7ee7\u7eed\u8f6e\u8be2\uff1a\u6700\u540e\u4e00\u884c\u51fa\u73b0\u5728 6.0 \u79d2\uff0c\u4f46\u8fdb\u7a0b\u4e00\u76f4\u5f00\u7740\uff0c\u76f4\u5230 16.9 \u79d2\uff0c\u56e0\u4e3a\u516d\u4e2a\u8f6e\u8be2\u5faa\u73af\u4ecd\u5728\u7ee7\u7eed\u3002\u5168\u90e8 6 \u4e2a token \u90fd\u88ab\u8bfb\u53d6\uff0c0 \u4e2a\u88ab\u63d0\u4ea4\u3002\u5f53 SDK \u5148\u653e\u5f03\u65f6\uff0c\u8f6e\u8be2\u505c\u6b62\uff1a\u6700\u540e\u4e00\u884c\u51fa\u73b0\u5728 8.4 \u79d2\uff0c\u8fdb\u7a0b\u5728 8.5 \u79d2\u7ed3\u675f\u3002\u6a21\u62df\u670d\u52a1\u4ecd\u7136\u5b8c\u6210\u4e86 6 \u6b21\u8bc6\u522b\uff0c0 \u4e2a token \u88ab\u8bfb\u53d6\u3002\u6240\u4ee5\u811a\u672c\u4ece capskip \u7684\u6570\u5b57\u63a8\u5bfc\u51fa JOB_TIMEOUT\uff0c\u5c31\u50cf\u6700\u540e\u4e00\u884c\u90a3\u6837\uff1a\u8d85\u65f6\u52a0\u4e00\u6b21\u8f6e\u8be2\u6682\u505c\u518d\u52a0\u4e00\u4e2a\u4f59\u91cf\u3002<\/p>\n<p>\u7ed9\u65e7\u4ee3\u7801\u7247\u6bb5\u7684\u4e00\u4e2a\u8bf4\u660e\uff1a\u5728 p-queue 8.1.0 \u4e2d\uff0c\u9664\u975e\u8bbe\u7f6e\u4e86 throwOnTimeout\uff0c\u5426\u5219\u8d85\u65f6\u7684\u4f5c\u4e1a\u4f1a\u4ee5 undefined resolve\u3002\u4ece 9.0.0 \u8d77\uff08\u6211\u4e5f\u8fd0\u884c\u8fc7\uff09\uff0c\u8d85\u65f6\u603b\u662f\u4ee5 TimeoutError reject\uff0c\u628a throwOnTimeout \u8bbe\u4e3a false \u6ca1\u6709\u4efb\u4f55\u6539\u53d8\u3002\u8fd9\u4e2a\u540d\u79f0\u5728 9.0.0 \u6216 10.0.0 \u7684\u6e90\u7801\u4e2d\u6839\u672c\u6ca1\u6709\u51fa\u73b0\u3002<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">\u505c\u6b62\u3001\u80cc\u538b\u3001\u901f\u7387\u9650\u5236\u548c\u5931\u8d25<\/h2>\n<p>\u6bcf\u6b21 add \u8c03\u7528\u90fd\u63a5\u53d7\u4e00\u4e2a signal\u3002\u5982\u679c\u5b83\u5728\u4f5c\u4e1a\u7b49\u5f85\u65f6\u4e2d\u6b62\uff0c\u4f5c\u4e1a\u4f1a\u88ab\u79fb\u9664\uff0c\u4e5f\u4e0d\u4f1a\u82b1\u6389\u4e00\u6b21\u8bc6\u522b\u3002\u5982\u679c\u5b83\u5728\u4f5c\u4e1a\u8fd0\u884c\u65f6\u4e2d\u6b62\uff0cadd \u4f1a reject \u5e76\u91ca\u653e\u4f4d\u7f6e\uff0c\u4f46\u4f5c\u4e1a\u7ee7\u7eed\u8fd0\u884c\uff0c\u8fd9\u662f\u540c\u4e00\u4e2a\u9677\u9631\u3002\u811a\u672c\u628a Ctrl+C \u8fde\u5230\u63a7\u5236\u5668\u4e0a\uff0c\u800c\u56e0\u4e3a\u6211\u65e0\u6cd5\u5728 Windows \u4e0a\u4ece\u6d4b\u8bd5\u4e2d\u5411\u5b50\u8fdb\u7a0b\u53d1\u9001\u4e2d\u65ad\uff0c\u6240\u4ee5\u8fd9\u6b21\u8fd0\u884c\u7528\u4e86\u4e00\u4e2a\u5728 4.0 \u79d2\u8c03\u7528\u540c\u4e00\u4e2a abort \u7684\u5b9a\u65f6\u5668\u300212 \u4e2a\u4f5c\u4e1a\u3001\u4e09\u4e2a\u7ebf\u7a0b\u30012.0 \u79d2\u8bc6\u522b\u548c polling_interval 1 \u65f6\uff0c\u4e09\u4e2a\u4f5c\u4e1a\u5df2\u5b8c\u6210\uff0c\u4e09\u4e2a\u5728\u8fd0\u884c\uff0c\u516d\u4e2a\u5728\u7b49\u5f85\u3002\u4e5d\u4e2a\u5168\u90e8\u4ee5\u4e2d\u6b62\u539f\u56e0\u88ab\u62d2\u7edd\uff0c\u6a21\u62df\u670d\u52a1\u6536\u5230 6 \u6b21\u8bc6\u522b\uff0c\u800c\u4e0d\u662f 12 \u6b21\u3002\u6b63\u5728\u8fd0\u884c\u7684\u4f5c\u4e1a\u7ee7\u7eed\u8f6e\u8be2\uff0c\u6240\u4ee5\u8fdb\u7a0b\u5728 5.7 \u79d2\u7ed3\u675f\uff0c\u6bd4\u4e2d\u6b62\u665a\u4e86 1.7 \u79d2\u3002<\/p>\n<p>\u628a\u961f\u5217\u7684 signal \u7ee7\u7eed\u4f20\u7ed9 fetch\uff0c\u624d\u80fd\u8ba9\u88ab\u653e\u5f03\u7684\u4f5c\u4e1a\u4e0d\u53bb\u63d0\u4ea4\u3002fetch \u8c03\u7528\u4e2d\u4e0d\u5e26 signal \u65f6\uff0c\u4e09\u4e2a\u88ab\u653e\u5f03\u7684\u4f5c\u4e1a\u4ecd\u7136\u5728 5.6 \u79d2\u63d0\u4ea4\u4e86\u5b83\u4eec\u7684 token\uff0c\u7ad9\u70b9\u6536\u5230 6 \u6b21\u8868\u5355 POST \u8bf7\u6c42\uff0c\u800c\u4e0d\u662f 3 \u6b21\u3002<\/p>\n<p>\u5bf9\u4e8e\u80cc\u538b\uff0cqueue.size \u7edf\u8ba1\u7b49\u5f85\u7684\u4f5c\u4e1a\uff0cqueue.pending \u7edf\u8ba1\u6b63\u5728\u8fd0\u884c\u7684\u4f5c\u4e1a\uff0conIdle \u5728\u4e24\u8005\u90fd\u4e3a\u96f6\u65f6 resolve\u3002\u4e00\u4e2a\u5728\u5faa\u73af\u91cc\u6dfb\u52a0 60 \u4e2a\u4f5c\u4e1a\u7684\u751f\u4ea7\u8005\uff0c\u7559\u4e0b\u4e86 57 \u4e2a\u5728\u7b49\u5f85\uff0c\u800c\u4e00\u4e2a await onSizeLessThan(6) \u7684\u751f\u4ea7\u8005\uff0c\u7b49\u5f85\u7684\u4ece\u672a\u8d85\u8fc7 6 \u4e2a\uff0c\u4e24\u8005\u5927\u7ea6\u5728\u540c\u6837\u7684\u65f6\u95f4\u5185\u5b8c\u6210\uff08\u5404\u7ea6 15.5 \u79d2\uff09\u3002\u4e2d\u6b62\u6216\u5d29\u6e83\u4f1a\u4e22\u5f03\u6bcf\u4e00\u4e2a\u7b49\u5f85\u4e2d\u7684\u4f5c\u4e1a\uff0c\u6240\u4ee5\u628a\u8fd9\u4e2a\u6570\u4fdd\u6301\u5f97\u5c0f\uff0c\u4e22\u5931\u4e5f\u5c31\u5c0f\u3002<\/p>\n<p>interval \u548c intervalCap \u8fd9\u4e24\u4e2a\u9009\u9879\u9650\u5236\u6bcf\u4e2a\u65f6\u95f4\u95f4\u9694\u5185\u6709\u591a\u5c11\u4e2a\u4f5c\u4e1a\u5f00\u59cb\u3002\u5728\u4e00\u4e2a\u6709 12 \u4e2a\u7ebf\u7a0b\u3001\u8bc6\u522b 0.5 \u79d2\u3001\u5e76\u53d1\u6570\u4e3a 6 \u7684\u6a21\u62df\u4e2d\uff0c\u6ca1\u6709\u9650\u5236\u65f6\uff0c\u516d\u6b21\u8868\u5355 POST \u8bf7\u6c42\u5728 0.8 \u79d2\u4e00\u8d77\u5230\u8fbe\u7ad9\u70b9\uff0c\u53e6\u5916\u516d\u6b21\u5728 1.6 \u79d2\u5230\u8fbe\u3002\u8bbe\u7f6e intervalCap 2 \u548c interval 1000 \u540e\uff0c\u5b83\u4eec\u4e24\u4e2a\u4e00\u7ec4\uff0c\u76f8\u9694\u5927\u7ea6\u4e00\u79d2\u5230\u8fbe\uff0c\u4ece 0.8 \u79d2\u5230 5.8 \u79d2\u3002\u8fd9\u4e2a\u4e0a\u9650\u7edf\u8ba1\u7684\u662f\u4f5c\u4e1a\u5f00\u59cb\uff0c\u6240\u4ee5\u8868\u5355\u63d0\u4ea4\u843d\u5728\u8bc6\u522b\u548c\u8f6e\u8be2\u6ede\u540e\u4e4b\u540e\uff0c\u800c\u4e0d\u662f\u5f00\u5934\u3002\u628a\u5b83\u7528\u5728\u76ee\u6807\u7ad9\u70b9\u4e0a\uff0c\u5e76\u9605\u8bfb <a href=\"https:\/\/capskip.com\/zh\/http-429-too-many-requests\/\">HTTP 429 \u6307\u5357<\/a> \uff0c\u4e86\u89e3\u7ad9\u70b9\u4ecd\u7136\u8fd4\u56de 429 \u65f6\u8be5\u600e\u4e48\u529e\u3002<\/p>\n<p>\u4e00\u4e2a\u5931\u8d25\u7684\u4f5c\u4e1a\u4e0d\u80fd\u628a\u5176\u4ed6\u4f5c\u4e1a\u4e00\u8d77\u62d6\u4e0b\u6c34\u3002\u5728\u4e00\u4e2a\u8ba9\u7b2c\u4e8c\u4e2a\u4efb\u52a1\u5931\u8d25\u7684\u6a21\u62df\u91cc\uff0c\u7528\u516d\u4e2a\u4f5c\u4e1a\uff0c\u6309\u8fd9\u91cc\u7684\u5199\u6cd5\uff0c\u811a\u672c\u6253\u5370\u4e86 5 \u884c ok \u548c\u4e00\u884c FAIL\uff0c\u5e76\u6309\u8bbe\u8ba1\u4ee5\u9000\u51fa\u7801 1 \u9000\u51fa\u3002\u5e26\u6709\u88f8 add \u8c03\u7528\u7684\u540c\u4e00\u4e2a\u5faa\u73af\uff0c\u5728 1.9 \u79d2\u65f6\u5d29\u6e83\uff0c\u9000\u51fa\u7801 1\uff0c\u5e76\u5e26\u7740\u672a\u5904\u7406\u7684 ApiException\uff0c\u6b64\u65f6\u8fd8\u6ca1\u6709\u4efb\u4f55\u8868\u5355\u63d0\u4ea4\u5230\u8fbe\u7ad9\u70b9\u3002\u4e00\u6b21 await \u7684 addAll \u5728 1.8 \u79d2\u65f6\u628a\u7b2c\u4e00\u4e2a\u9519\u8bef\u4ea4\u7ed9\u8c03\u7528\u65b9\uff0c\u4ec5\u6b64\u800c\u5df2\uff1a\u5176\u4ed6\u4e94\u4e2a\u4f5c\u4e1a\u4ecd\u7136\u8fd0\u884c\u5e76\u63d0\u4ea4\uff0c\u5374\u6ca1\u6709\u6253\u5370\u4efb\u4f55\u7ed3\u679c\u3002\u5bf9 add \u8c03\u7528\u4f7f\u7528 Promise.allSettled\uff0c\u4e0e\u5904\u7406\u7a0b\u5e8f\u7684\u6548\u679c\u4e00\u81f4\u3002<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">\u5e38\u89c1\u9519\u8bef<\/h2>\n<p>\u6807\u6709 seen \u7684\u884c\uff0c\u662f\u5728\u6211\u9488\u5bf9\u6a21\u62df\u670d\u52a1\u8fd0\u884c\u7684 p-queue \u9a8c\u8bc1\u7801\u4efb\u52a1\u4e2d\u91cd\u73b0\u7684\u3002<\/p>\n<table>\n<thead>\n<tr>\n<th>\u9519\u8bef<\/th>\n<th>\u539f\u56e0<\/th>\n<th>\u4fee\u590d<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>ERR_REQUIRE_ESM<\/td>\n<td>\u5728 Node.js 20.11.1 \u4e0a require p-queue\uff08seen\uff09<\/td>\n<td>\u4f7f\u7528 import()<\/td>\n<\/tr>\n<tr>\n<td>not a constructor<\/td>\n<td>require p-queue \u8fd4\u56de\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4\u5bf9\u8c61\uff08seen\uff09<\/td>\n<td>\u901a\u8fc7 import() \u4f7f\u7528\u9ed8\u8ba4\u5bfc\u51fa<\/td>\n<\/tr>\n<tr>\n<td>\u6765\u81ea p-queue \u7684 TimeoutError<\/td>\n<td>\u4f5c\u4e1a\u8fd0\u884c\u7684\u65f6\u95f4\u8d85\u8fc7\u4e86\u5b83\u7684\u8d85\u65f6\uff0c\u800c\u8fd9\u4e2a\u8d85\u65f6\u53ea\u7edf\u8ba1\u8fd0\u884c\u65f6\u95f4\uff08seen\uff09<\/td>\n<td>\u628a JOB_TIMEOUT \u63d0\u9ad8\u5230 capskip \u7684\u6570\u5b57\u4e4b\u4e0a<\/td>\n<\/tr>\n<tr>\n<td>\u6765\u81ea capskip \u7684 TimeoutException<\/td>\n<td>\u622a\u6b62\u65f6\u95f4\u4e4b\u524d\u6ca1\u6709\u5e94\u7b54\uff0c\u8fd9\u4e2a\u65f6\u95f4\u5305\u542b\u5728 CapSkip \u5185\u90e8\u7b49\u5f85\u7684\u65f6\u95f4\uff08seen\uff09<\/td>\n<td>\u964d\u4f4e\u5e76\u53d1\u6570\uff0c\u6216\u63d0\u9ad8\u8d85\u65f6<\/td>\n<\/tr>\n<tr>\n<td>ERROR_CAPTCHA_UNSOLVABLE<\/td>\n<td>\u4efb\u52a1\u65e0\u6cd5\u8bc6\u522b\uff0c\u4f9d\u636e CapSkip \u6587\u6863\u3002\u6211\u7684\u6a21\u62df\u670d\u52a1\u4e3a\u5176\u4e2d\u4e00\u4e2a\u4f5c\u4e1a\u5236\u9020\u4e86\u5b83<\/td>\n<td>\u91cd\u65b0\u8fd0\u884c\u90a3\u4e2a\u4f5c\u4e1a<\/td>\n<\/tr>\n<tr>\n<td>\u8fdb\u7a0b\u4ee5\u9000\u51fa\u7801 1 \u7ed3\u675f<\/td>\n<td>\u4e00\u4e2a add \u8c03\u7528\u88ab reject\uff0c\u800c\u6ca1\u6709\u4eba\u5904\u7406\uff08seen\uff09<\/td>\n<td>\u7ed9\u6bcf\u4e2a add \u8c03\u7528\u52a0\u4e00\u4e2a catch<\/td>\n<\/tr>\n<tr>\n<td>\u7ad9\u70b9\u8fd4\u56de HTTP 403<\/td>\n<td>\u6211\u7684\u6a21\u62df\u670d\u52a1\u62d2\u7edd\u7f3a\u5c11 Referer \u6216\u91cd\u590d\u4f7f\u7528\u7684 token<\/td>\n<td>\u4e0e\u9875\u9762\u53d1\u9001\u7684\u8bf7\u6c42\u6bd4\u8f83<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">\u5e38\u89c1\u95ee\u9898<\/h2>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">CapSkip \u80fd\u8fd0\u884c\u5728\u53e6\u4e00\u53f0 PC \u4e0a\u5417\uff1f<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">p-queue \u9a8c\u8bc1\u7801\u4f5c\u4e1a\u53ef\u4ee5\u8fd0\u884c\u5728\u4e00\u53f0 PC \u4e0a\uff0c\u800c CapSkip \u5728\u53e6\u4e00\u53f0\u4e0a\u3002\u628a CapSkip \u8bbe\u4e3a Server mode\uff0c\u5e76\u628a\u5ba2\u6237\u7aef\u7684 host \u9009\u9879\u8bbe\u4e3a\u90a3\u53f0 PC\u3002Max. Threads \u4ecd\u7136\u9650\u5236\u8bc6\u522b\u6570\u91cf\uff0c\u961f\u5217\u7684\u5e76\u53d1\u6570\u4ecd\u7136\u662f\u8981\u5339\u914d\u7684\u90a3\u4e2a\u6570\u5b57\u3002 <a href=\"https:\/\/capskip.com\/zh\/setup-guide\/#connection-settings\">\u8bbe\u7f6e\u6307\u5357<\/a> \u4ecb\u7ecd\u4e86\u4e24\u79cd\u6a21\u5f0f\u3002\u5728 Server mode \u4e0b\uff0cCapSkip \u5141\u8bb8\u6765\u81ea\u4efb\u4f55\u5730\u5740\u7684\u3001\u53d1\u5f80\u5b83\u7aef\u53e3\u7684\u5165\u7ad9\u8fde\u63a5\uff0c\u6240\u4ee5\u4f60\u81ea\u5df1\u52a0\u7684\u66f4\u7a84\u7684\u5141\u8bb8\u89c4\u5219\u4ec0\u4e48\u4e5f\u6539\u53d8\u4e0d\u4e86\u3002\u4e3a\u6bcf\u4e00\u53f0\u4f60\u4e0d\u9884\u671f\u7684\u673a\u5668\u6dfb\u52a0\u4e00\u6761 Windows Firewall \u963b\u6b62\u89c4\u5219\uff0c\u5e76\u5f00\u542f API Key Validation\uff0c\u628a\u4f60\u7684 key \u4f5c\u4e3a apiKey \u9009\u9879\u4f20\u5165\u3002<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">p-queue \u4f1a\u91cd\u8bd5\u5931\u8d25\u7684\u8bc6\u522b\u5417\uff1f<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">\u4e0d\u4f1a\u3002\u5b83\u7684\u9009\u9879\u548c\u6e90\u7801\u90fd\u6ca1\u6709\u63d0\u5230\u91cd\u8bd5\u3002\u81ea\u5df1\u91cd\u65b0\u6dfb\u52a0\u4f5c\u4e1a\uff0c\u8fd9\u4f1a\u5f97\u5230\u4e00\u6b21\u5168\u65b0\u7684\u8bc6\u522b\uff0c\u56e0\u4e3a token \u53ea\u80fd\u7528\u4e00\u6b21\u3002<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">\u6bcf\u79cd\u9a8c\u8bc1\u7801\u7c7b\u578b\u5e94\u8be5\u5171\u7528\u4e00\u4e2a\u961f\u5217\u5417\uff1f<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">\u4e0d\u5e94\u8be5\u3002\u8bbe\u7f6e\u6307\u5357\u4e3a\u6bcf\u79cd\u7c7b\u578b\u5404\u7ed9\u4e86\u4e00\u4e2a Max. Threads\uff0c\u6240\u4ee5\u4e3a\u6bcf\u79cd\u7c7b\u578b\u5404\u7528\u4e00\u4e2a\u961f\u5217\u548c\u5404\u81ea\u7684\u5e76\u53d1\u6570\u3002\u5982\u679c\u8981\u7528\u6d4f\u89c8\u5668 worker \u800c\u4e0d\u662f\u666e\u901a\u8bf7\u6c42\uff0c\u8bf7\u53c2\u9605 <a href=\"https:\/\/capskip.com\/zh\/puppeteer-cluster-captcha\/\">puppeteer-cluster \u6307\u5357<\/a>.<\/p>\n<\/details>\n<p>p-queue \u9a8c\u8bc1\u7801\u4f5c\u4e1a\u5f52\u7ed3\u4e3a\uff1a\u63a5\u8fd1 Max. Threads \u7684\u5e76\u53d1\u6570\u3001\u4e00\u4e2a\u6db5\u76d6\u7b49\u5f85\u65f6\u95f4\u7684 capskip \u8d85\u65f6\u3001\u4e00\u4e2a\u9ad8\u4e8e\u5b83\u7684\u961f\u5217\u8d85\u65f6\uff0c\u4ee5\u53ca\u7ed9\u6bcf\u4e2a add \u8c03\u7528\u52a0\u4e00\u4e2a catch\u3002\u8fd9\u4e00\u5207\u90fd\u4e0d\u82b1\u4e00\u5206\u94b1\uff0c\u56e0\u4e3a\u8fd9\u4e2a <a href=\"https:\/\/capskip.com\/zh\/\">\u9a8c\u8bc1\u7801\u8bc6\u522b\u5de5\u5177<\/a> \u8fd0\u884c\u5728\u4f60\u81ea\u5df1\u7684 PC \u4e0a\uff0c\u800c <a href=\"https:\/\/capskip.com\/zh\/nodejs-captcha-solver\/\">Node.js \u9a8c\u8bc1\u7801\u8bc6\u522b\u9875\u9762<\/a> \u6db5\u76d6\u4e86\u5176\u4ed6\u9a8c\u8bc1\u7801\u7c7b\u578b\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>p-queue \u9a8c\u8bc1\u7801\u4f5c\u4e1a\u6709\u4e24\u4e2a\u8d70\u4e0d\u540c\u65f6\u949f\u7684\u8d85\u65f6\uff0c\u8fd8\u6709\u4e00\u4e2a\u4f1a\u5fd8\u8bb0\u5b83\u5df2\u653e\u5f03\u7684\u8bc6\u522b\u7684\u961f\u5217\u3002\u8fd9\u4e2a Node.js \u811a\u672c\u9488\u5bf9 CapSkip \u4e3a\u4e24\u8005\u5b9a\u597d\u4e86\u5927\u5c0f\u3002<\/p>","protected":false},"author":1,"featured_media":28706,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"p-queue CAPTCHA Solving: Concurrency and Timeouts | CapSkip","rank_math_description":"Run a p-queue captcha job in Node.js: match concurrency to Max. Threads, set both timeouts right and keep one failed solve from stopping the run. Copy it.","rank_math_focus_keyword":"p-queue captcha","footnotes":""},"categories":[70],"tags":[],"class_list":["post-28707","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-captcha"],"_links":{"self":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28707","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/comments?post=28707"}],"version-history":[{"count":1,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28707\/revisions"}],"predecessor-version":[{"id":29157,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28707\/revisions\/29157"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media\/28706"}],"wp:attachment":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media?parent=28707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/categories?post=28707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/tags?post=28707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}