MCPcopy Create free account
hub / github.com/ZainCheung/netease-cloud / taskPool

Function taskPool

main.py:366–390  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

364任务池
365'''
366def taskPool():
367
368 config = init()
369 check() # 每天对api做一次检查
370 if config['peopleSwitch'] is True:
371 print('多人开关已打开,即将开始执行多人任务')
372 logging.info('多人开关已打开,即将执行进行多人任务')
373 account = loadJson("account.json")
374 for man in account:
375 print('账号: ' + man['account'] + ' 开始执行')
376 logging.info('账号: ' + man['account'] + ' 开始执行========================================')
377 task = Task(man['account'], man['password'], man['pushmethod'], man['sckey'], man['appToken'], man['wxpusheruid'], man['barkServer'], man['barkKey'], man['countrycode'])
378 task.start()
379 time.sleep(10)
380 print('所有账号已全部完成任务,服务进入休眠中,等待明天重新启动')
381 logging.info('所有账号已全部完成任务,服务进入休眠中,等待明天重新启动')
382 else :
383 print('账号: ' + config['uin'] + ' 开始执行')
384 logging.info('账号: ' + config['uin'] + ' 开始执行========================================')
385 if config['md5Switch'] is True:
386 print('MD5开关已打开,即将开始为你加密,密码不会上传至服务器,请知悉')
387 logging.info('MD5开关已打开,即将开始为你加密,密码不会上传至服务器,请知悉')
388 config['pwd'] = md5(config['pwd'])
389 task = Task(config['uin'], config['pwd'], config['pushmethod'], config['sckey'], config['appToken'], config['wxpusheruid'], config['barkServer'], config['barkKey'], config['countrycode'])
390 task.start()
391
392'''
393程序的入口

Callers

nothing calls this directly

Calls 6

startMethod · 0.95
initFunction · 0.70
checkFunction · 0.70
loadJsonFunction · 0.70
TaskClass · 0.70
md5Function · 0.70

Tested by

no test coverage detected