Browse Source

HeroBot add task failed status support

master
filesite 7 months ago
parent
commit
97d1c32157
  1. 5
      heroBot.mjs

5
heroBot.mjs

@ -122,12 +122,15 @@ class HeroBot {
} }
//回传任务数据给联盟 //回传任务数据给联盟
async saveTaskData(task_id, task_token, task_data) { async saveTaskData(task_id, task_token, task_data, task_status) {
let params = { let params = {
name: this.name, name: this.name,
task_id: task_id, task_id: task_id,
task_result: task_data task_result: task_data
}; };
if (typeof(task_status) != 'undefined') {
params.status = task_status;
}
params.sign = this.sign(params, task_token); //对参数进行签名 params.sign = this.sign(params, task_token); //对参数进行签名
let response = null; let response = null;

Loading…
Cancel
Save