Skip to content

Commit

Permalink
chore: add some logs for pipeline timeout and interrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Oct 17, 2023
1 parent e805596 commit e13ae7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/MaaFramework/Task/PipelineTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ PipelineTask::RunningResult PipelineTask::find_first_and_run(const std::vector<s
}

if (std::chrono::steady_clock::now() - start_time > timeout) {
LogInfo << "Task timeout" << VAR(cur_task_name_) << VAR(timeout);
return RunningResult::Timeout;
}
if (need_exit()) {
LogInfo << "Task interrupted" << VAR(cur_task_name_);
return RunningResult::Interrupted;
}
}
Expand Down Expand Up @@ -142,6 +144,7 @@ PipelineTask::RunningResult PipelineTask::run_task(const HitResult& hits)
}

if (need_exit()) {
LogInfo << "Task interrupted" << VAR(cur_task_name_);
return RunningResult::Interrupted;
}

Expand Down

0 comments on commit e13ae7a

Please sign in to comment.