MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / finalize_generic_task_cloud

Method finalize_generic_task_cloud

daily/chinaUnicom.py:2331–2346  ·  view source on GitHub ↗
(self, task_code, task_name)

Source from the content-addressed store, hash-verified

2329 return None
2330
2331 def finalize_generic_task_cloud(self, task_code, task_name):
2332 current_task = self.get_cloud_task_by_code_cloud(task_code)
2333 if not isinstance(current_task, dict):
2334 return
2335 finish_text = current_task.get('finishText')
2336 finished = int(current_task.get('finishCount', 0) or 0)
2337 required = int(current_task.get('needCount', 0) or 0)
2338 if finish_text == "待领取":
2339 self.doPopUp_cloud(task_code, task_name, False)
2340 return
2341 if finish_text in ["已完成", "已领取"] or (required > 0 and finished >= required):
2342 record = self.match_new_cloud_task_record(task_name)
2343 if record:
2344 self.log(f"云盘任务: ✅ [{task_name}] 完成, 获得积分: {record.get('earnScoreDesc')}")
2345 else:
2346 self.log(f"云盘任务: ✅ [{task_name}] 已完成")
2347
2348 def get_cloud_upload_name_cloud(self):
2349 return os.environ.get("UNICOM_CLOUD_UPLOAD_FILENAME", "8648").strip() or "8648"

Callers 1

Calls 5

doPopUp_cloudMethod · 0.95
logMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected