From 97eff3a81662f4871a9663916c4e012617963d3e Mon Sep 17 00:00:00 2001 From: M_Kececi Date: Mon, 22 Jun 2026 22:37:06 +0300 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- svc/product_series_auto_scheduler.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/svc/product_series_auto_scheduler.go b/svc/product_series_auto_scheduler.go index 2dd88bd..b9c51b5 100644 --- a/svc/product_series_auto_scheduler.go +++ b/svc/product_series_auto_scheduler.go @@ -679,11 +679,9 @@ func productSeriesEnqueueTx(ctx context.Context, tx *sql.Tx, productCode, colorC _, err := tx.ExecContext(ctx, ` INSERT INTO mk_product_series_recalc_queue (row_key, product_code, color_code, dim3_code, reason, status, attempts, available_at, queued_at, last_error, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, 'pending', 0, now(), now(), '', now(), now()) +ON CONFLICT (row_key) WHERE status IN ('pending','processing') DO NOTHING `, productSeriesAutoKey(productCode, colorCode, dim3Code), productCode, colorCode, dim3Code, strings.TrimSpace(reason)) if err != nil { - if pe, ok := err.(*pq.Error); ok && pe != nil && string(pe.Code) == "23505" { - return 0, nil - } return 0, err } return 1, nil