xiongzhu 10 月之前
父節點
當前提交
a6b2e845c4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/device/device.service.ts

+ 2 - 2
src/device/device.service.ts

@@ -557,7 +557,7 @@ export class DeviceService implements OnModuleInit {
                 useCountry: countryMapping.find((c) => c.id === task.country)?.useCountry || ['any'],
                 exclude: countryMapping.find((c) => c.id === task.country)?.exclude || [],
                 devices: devices.filter((d) => d.pinTask === task.id),
-                maxDevices: Math.max(Math.ceil((task.total - task.sent) / 20), 5)
+                maxDevices: Math.max(Math.ceil((task.total - task.sent) / 20), 10)
             }
         })
 
@@ -572,7 +572,7 @@ export class DeviceService implements OnModuleInit {
                     await this.removePinTask(device.id)
                 }
             }
-            let candidateTasks = res.filter((r) => Math.ceil((r.task.total - r.task.sent) / 5 + 5) > r.devices.length)
+            let candidateTasks = res.filter((r) => Math.ceil((r.task.total - r.task.sent) / 5 + 10) > r.devices.length)
             if (device.matchCountry && device.pinCountry) {
                 candidateTasks = candidateTasks.filter((r) => {
                     return (