|
|
@@ -46,6 +46,7 @@ export const batchSize = 9
|
|
|
export class TaskService implements OnModuleInit {
|
|
|
private lock = new AsyncLock()
|
|
|
private TAG = 'TaskService'
|
|
|
+
|
|
|
constructor(
|
|
|
@InjectRepository(Task)
|
|
|
private taskRepository: Repository<Task>,
|
|
|
@@ -142,7 +143,7 @@ export class TaskService implements OnModuleInit {
|
|
|
task.message = task.message || ''
|
|
|
task.total = phones.length
|
|
|
task.country = phoneList.country
|
|
|
- task.groupMode = task.groupMode ?? await this.sysConfigService.getBoolean('group_mode', false)
|
|
|
+ task.groupMode = task.groupMode ?? (await this.sysConfigService.getBoolean('group_mode', false))
|
|
|
if (task.country) {
|
|
|
const countryConfig = await this.countryConfigService.getDestConfig(task.country)
|
|
|
task.useBackup = countryConfig.useBackup
|
|
|
@@ -698,6 +699,7 @@ export class TaskService implements OnModuleInit {
|
|
|
async balanceStatistics() {
|
|
|
const res = {
|
|
|
durian: 0,
|
|
|
+ durian02: 0,
|
|
|
cloud033: 0,
|
|
|
cloud034: 0,
|
|
|
cloud037: 0,
|
|
|
@@ -746,6 +748,27 @@ export class TaskService implements OnModuleInit {
|
|
|
}
|
|
|
} catch (e) {}
|
|
|
})(),
|
|
|
+ (async () => {
|
|
|
+ try {
|
|
|
+ const durianRes02 = await axios
|
|
|
+ .create({
|
|
|
+ baseURL: 'http://8.218.211.187/out/ext_api/',
|
|
|
+ headers: {
|
|
|
+ uhost: 'api.durianrcs.com',
|
|
|
+ uprotocol: 'http'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .get('getUserInfo', {
|
|
|
+ params: {
|
|
|
+ name: 'unsnap30941',
|
|
|
+ ApiKey: 'RHJGV1paR1BFWjlFbCtnakUza2xJdz09'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (durianRes02.data.code === 200) {
|
|
|
+ res.durian02 = durianRes02.data.data.score
|
|
|
+ }
|
|
|
+ } catch (e) {}
|
|
|
+ })(),
|
|
|
(async () => {
|
|
|
try {
|
|
|
const cowboyRes = await axios
|