MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / handle_tasker_post_stop

Method handle_tasker_post_stop

source/MaaAgentClient/Client/AgentClient.cpp:1094–1115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1092}
1093
1094bool AgentClient::handle_tasker_post_stop(const json::value& j)
1095{
1096 if (!j.is<TaskerPostStopReverseRequest>()) {
1097 return false;
1098 }
1099 const TaskerPostStopReverseRequest& req = j.as<TaskerPostStopReverseRequest>();
1100 LogFunc << VAR(req) << VAR(ipc_addr_);
1101
1102 MaaTasker* tasker = query_tasker(req.tasker_id);
1103 if (!tasker) {
1104 LogError << "tasker not found" << VAR(req.tasker_id);
1105 return false;
1106 }
1107
1108 MaaTaskId task_id = tasker->post_stop();
1109 TaskerPostStopReverseResponse resp {
1110 .task_id = task_id,
1111 };
1112 send(resp);
1113
1114 return true;
1115}
1116
1117bool AgentClient::handle_tasker_stopping(const json::value& j)
1118{

Callers

nothing calls this directly

Calls 1

post_stopMethod · 0.45

Tested by

no test coverage detected