...
|
...
|
@@ -132,6 +132,53 @@ def teardown_hook_get_appoint_task_id(response): |
|
|
except Exception as e:
|
|
|
print('写入失败', e)
|
|
|
return task_id
|
|
|
|
|
|
#第一次写入进行中的数据
|
|
|
def teardown_hook_get_task_3_1_total(response):
|
|
|
if response.status_code == 200:
|
|
|
jsondata = json.loads(response.text)
|
|
|
task_total =str(len(jsondata['data']['tasks']))
|
|
|
try:
|
|
|
with open(path + 'config/task_3_total.txt','w+') as f:
|
|
|
f.write(task_total)
|
|
|
print('写入成功,task_total:{}'.format(task_total))
|
|
|
f.close()
|
|
|
except Exception as e:
|
|
|
print('写入失败', e)
|
|
|
return task_total
|
|
|
#第二次写入进行中的数据
|
|
|
def teardown_hook_get_task_3_2_total(response):
|
|
|
if response.status_code == 200:
|
|
|
jsondata = json.loads(response.text)
|
|
|
task_total =str(len(jsondata['data']['tasks']))
|
|
|
try:
|
|
|
with open(path + 'config/task_3_2_total.txt','w+') as f:
|
|
|
f.write(task_total)
|
|
|
print('写入成功,task_total:{}'.format(task_total))
|
|
|
f.close()
|
|
|
except Exception as e:
|
|
|
print('写入失败', e)
|
|
|
return task_total
|
|
|
#第一次获取进行中的数据
|
|
|
def get_task_3_total():
|
|
|
try:
|
|
|
# 保存token到文件
|
|
|
with open(path + "config/task_3_total.txt", 'r') as f:
|
|
|
task_total = f.read()
|
|
|
print('读取成功,task_total:{}'.format(task_total))
|
|
|
except Exception as e:
|
|
|
print('读取失败', e)
|
|
|
return task_total
|
|
|
#第二次获取进行中的数据
|
|
|
def get_task_3_2_total():
|
|
|
try:
|
|
|
# 保存token到文件
|
|
|
with open(path + "config/task_3_2_total.txt", 'r') as f:
|
|
|
task_total = f.read()
|
|
|
print('读取成功,task_total:{}'.format(task_total))
|
|
|
except Exception as e:
|
|
|
print('读取失败', e)
|
|
|
return task_total
|
|
|
#获取指派任务id
|
|
|
def get_appoint_task_id():
|
|
|
try:
|
...
|
...
|
|