|
@@ -43,6 +43,7 @@ class Worker {
|
|
|
|
|
|
|
|
this.maxRetry = 3
|
|
this.maxRetry = 3
|
|
|
this.timeout = 15000
|
|
this.timeout = 15000
|
|
|
|
|
+ this.maxQueueLength = 2000
|
|
|
|
|
|
|
|
this.defaultUserAgent = 'Mozilla/5.0 (Linux; Android 16; 2211133C Build/BP2A.250605.031.A3; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.180 Mobile Safari/537.36 XWEB/1380347 MMWEBSDK/20250202 MMWEBID/1020 wxwork/5.0.6.66174 MicroMessenger/8.0.28.48(0x28001c30) MiniProgramEnv/android Luggage/3.0.2.95ef3f83 NetType/WIFI Language/zh_CN ABI/arm64'
|
|
this.defaultUserAgent = 'Mozilla/5.0 (Linux; Android 16; 2211133C Build/BP2A.250605.031.A3; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.180 Mobile Safari/537.36 XWEB/1380347 MMWEBSDK/20250202 MMWEBID/1020 wxwork/5.0.6.66174 MicroMessenger/8.0.28.48(0x28001c30) MiniProgramEnv/android Luggage/3.0.2.95ef3f83 NetType/WIFI Language/zh_CN ABI/arm64'
|
|
|
|
|
|
|
@@ -1178,8 +1179,18 @@ class Worker {
|
|
|
await channel.prefetch(5)
|
|
await channel.prefetch(5)
|
|
|
|
|
|
|
|
await assertRunforgeTaskIngress(channel, this.logger)
|
|
await assertRunforgeTaskIngress(channel, this.logger)
|
|
|
- await channel.assertQueue(this.resultQueue, { durable: true })
|
|
|
|
|
- await channel.assertQueue(this.deadQueue, { durable: true })
|
|
|
|
|
|
|
+ await channel.assertQueue(this.resultQueue, {
|
|
|
|
|
+ durable: true,
|
|
|
|
|
+ arguments: {
|
|
|
|
|
+ 'x-max-length': this.maxQueueLength
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ await channel.assertQueue(this.deadQueue, {
|
|
|
|
|
+ durable: true,
|
|
|
|
|
+ arguments: {
|
|
|
|
|
+ 'x-max-length': this.maxQueueLength
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
await channel.consume(this.taskQueue, async (msg) => {
|
|
await channel.consume(this.taskQueue, async (msg) => {
|
|
|
if (!msg) return
|
|
if (!msg) return
|