From 17ce36aee13bc6c406b6930bf6b1207c2f624f6f Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Tue, 4 Mar 2025 23:26:23 +0100 Subject: [PATCH] quote some sql --- services/actions/cleanup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/actions/cleanup.go b/services/actions/cleanup.go index cb48f5315a..36259318f5 100644 --- a/services/actions/cleanup.go +++ b/services/actions/cleanup.go @@ -135,7 +135,7 @@ const deleteEphemeralRunnerBatchSize = 100 // CleanupEphemeralRunners removes used ephemeral runners which are no longer able to process jobs func CleanupEphemeralRunners(ctx context.Context) error { runners := []*actions_model.ActionRunner{} - err := db.GetEngine(ctx).Join("INNER", "action_task", "action_task.runner_id = action_runner.id").Where("action_runner.ephemeral and action_task.status != ? and action_task.status != ? and action_task.status != ?)", actions_model.StatusWaiting, actions_model.StatusRunning, actions_model.StatusBlocked).Limit(deleteEphemeralRunnerBatchSize).Find(&runners) + err := db.GetEngine(ctx).Join("INNER", "`action_task`", "`action_task`.`runner_id` = `action_runner`.`id`").Where("`action_runner`.`ephemeral` and `action_task`.`status` != ? and `action_task`.`status` != ? and `action_task`.`status` != ?)", actions_model.StatusWaiting, actions_model.StatusRunning, actions_model.StatusBlocked).Limit(deleteEphemeralRunnerBatchSize).Find(&runners) if err != nil { return fmt.Errorf("find runners: %w", err) }