From 0d4c256ca87a4dab1a3836c51311a326b09f5879 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 25 Mar 2025 17:16:57 +0100 Subject: [PATCH] feat(tasks): removed unnecessary wrapper --- backend/pkg/spot/transcoder/tasks.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/pkg/spot/transcoder/tasks.go b/backend/pkg/spot/transcoder/tasks.go index 761f1a679..69c5e76dc 100644 --- a/backend/pkg/spot/transcoder/tasks.go +++ b/backend/pkg/spot/transcoder/tasks.go @@ -29,7 +29,7 @@ type Task struct { Duration int Status string Path string - tx pool.Tx + tx *pool.Tx } func (t *Task) HasToTrim() bool { @@ -65,7 +65,7 @@ func (t *tasksImpl) Get() (task *Task, err error) { } }() - task = &Task{tx: pool.Tx{Tx: tx}} + task = &Task{tx: tx} sql := `SELECT spot_id, crop, duration FROM spots.tasks WHERE status = 'pending' ORDER BY added_time FOR UPDATE SKIP LOCKED LIMIT 1` err = tx.TxQueryRow(sql).Scan(&task.SpotID, &task.Crop, &task.Duration) if err != nil {