fix task finished event (#440)
This commit is contained in:
committed by
GitHub
parent
3ed134d7d5
commit
8fb00cb839
@@ -351,18 +351,20 @@ impl LocalContainerService {
|
||||
}
|
||||
|
||||
// Fire event when CodingAgent execution has finished
|
||||
if matches!(
|
||||
&ctx.execution_process.run_reason,
|
||||
ExecutionProcessRunReason::CodingAgent
|
||||
) && let Some(analytics) = &analytics
|
||||
{
|
||||
analytics.analytics_service.track_event(&analytics.user_id, "task_attempt_finished", Some(json!({
|
||||
if let Some(true) = config.read().await.analytics_enabled {
|
||||
if matches!(
|
||||
&ctx.execution_process.run_reason,
|
||||
ExecutionProcessRunReason::CodingAgent
|
||||
) && let Some(analytics) = &analytics
|
||||
{
|
||||
analytics.analytics_service.track_event(&analytics.user_id, "task_attempt_finished", Some(json!({
|
||||
"task_id": ctx.task.id.to_string(),
|
||||
"project_id": ctx.task.project_id.to_string(),
|
||||
"attempt_id": ctx.task_attempt.id.to_string(),
|
||||
"execution_success": matches!(ctx.execution_process.status, ExecutionProcessStatus::Completed),
|
||||
"exit_code": ctx.execution_process.exit_code,
|
||||
})));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user