1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2026-06-03 16:35:37 +02:00

Fix queue task processing (#5549)

This commit is contained in:
Robert Kaussow
2025-09-24 13:12:23 +02:00
committed by GitHub
parent a3db53dc05
commit 177de5d8d2
2 changed files with 15 additions and 16 deletions
+14 -15
View File
@@ -124,25 +124,24 @@ func processQueueTasks(store store.Store, tasks []*model.Task, agentNameMap map[
Task: *task,
}
if task.AgentID == 0 {
result = append(result, taskResponse)
continue
if task.AgentID != 0 {
name, ok := getAgentName(store, agentNameMap, task.AgentID)
if !ok {
return nil, fmt.Errorf("agent not found for task %s", task.ID)
}
taskResponse.AgentName = name
}
name, ok := getAgentName(store, agentNameMap, task.AgentID)
if !ok {
return nil, fmt.Errorf("agent not found for task %s", task.ID)
if task.PipelineID != 0 {
p, err := store.GetPipeline(task.PipelineID)
if err != nil {
return nil, fmt.Errorf("pipeline not found for task %s", task.ID)
}
taskResponse.PipelineNumber = p.Number
}
taskResponse.AgentName = name
p, err := store.GetPipeline(task.PipelineID)
if err != nil {
return nil, err
}
taskResponse.PipelineNumber = p.Number
result = append(result, taskResponse)
}
return result, nil
+1 -1
View File
@@ -73,7 +73,7 @@
</div>
<div class="ml-2 flex items-center gap-2">
<IconButton
v-if="task.agent_name"
v-if="task.pipeline_number"
icon="chevron-right"
:title="$t('repo.pipeline.view')"
class="h-8 w-8"