Skip to content

Commit fa011ed

Browse files
authored
Merge pull request #179 from cschleiden/cschleiden/redis-v9
Upgrade go-redis to `v9`
2 parents 2a42c1f + 88ec581 commit fa011ed

File tree

13 files changed

+27
-25
lines changed

13 files changed

+27
-25
lines changed

backend/redis/diagnostics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77

88
"github.com/cschleiden/go-workflows/diag"
9-
"github.com/go-redis/redis/v8"
9+
redis "github.com/redis/go-redis/v9"
1010
)
1111

1212
var _ diag.Backend = (*redisBackend)(nil)

backend/redis/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/cschleiden/go-workflows/internal/core"
99
"github.com/cschleiden/go-workflows/internal/history"
10-
"github.com/go-redis/redis/v8"
10+
"github.com/redis/go-redis/v9"
1111
)
1212

1313
func addEventToStreamP(ctx context.Context, p redis.Pipeliner, streamKey string, event *history.Event) error {

backend/redis/instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/cschleiden/go-workflows/internal/core"
1111
"github.com/cschleiden/go-workflows/internal/history"
1212
"github.com/cschleiden/go-workflows/workflow"
13-
"github.com/go-redis/redis/v8"
13+
"github.com/redis/go-redis/v9"
1414
)
1515

1616
func (rb *redisBackend) CreateWorkflowInstance(ctx context.Context, instance *workflow.Instance, event *history.Event) error {
@@ -138,7 +138,7 @@ func createInstanceP(ctx context.Context, p redis.Pipeliner, instance *core.Work
138138

139139
p.SetNX(ctx, key, string(b), 0)
140140

141-
p.ZAdd(ctx, instancesByCreation(), &redis.Z{
141+
p.ZAdd(ctx, instancesByCreation(), redis.Z{
142142
Member: instance.InstanceID,
143143
Score: float64(createdAt.UnixMilli()),
144144
})

backend/redis/queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"fmt"
77
"time"
88

9-
"github.com/go-redis/redis/v8"
109
"github.com/google/uuid"
10+
"github.com/redis/go-redis/v9"
1111
)
1212

1313
type taskQueue[T any] struct {

backend/redis/queue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/go-redis/redis/v8"
9+
"github.com/redis/go-redis/v9"
1010
"github.com/stretchr/testify/require"
1111
)
1212

backend/redis/redis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/cschleiden/go-workflows/internal/metrickeys"
1313
"github.com/cschleiden/go-workflows/log"
1414
"github.com/cschleiden/go-workflows/metrics"
15-
"github.com/go-redis/redis/v8"
15+
"github.com/redis/go-redis/v9"
1616
"go.opentelemetry.io/otel/trace"
1717
)
1818

backend/redis/redis_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/cschleiden/go-workflows/backend/test"
1313
"github.com/cschleiden/go-workflows/internal/history"
1414
"github.com/cschleiden/go-workflows/log"
15-
"github.com/go-redis/redis/v8"
15+
"github.com/redis/go-redis/v9"
1616
)
1717

1818
const (

backend/redis/signal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/cschleiden/go-workflows/internal/history"
88
"github.com/cschleiden/go-workflows/internal/tracing"
9-
"github.com/go-redis/redis/v8"
9+
"github.com/redis/go-redis/v9"
1010
"go.opentelemetry.io/otel/attribute"
1111
"go.opentelemetry.io/otel/trace"
1212
)

backend/redis/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/cschleiden/go-workflows/internal/history"
1212
"github.com/cschleiden/go-workflows/internal/task"
1313
"github.com/cschleiden/go-workflows/internal/tracing"
14-
"github.com/go-redis/redis/v8"
14+
"github.com/redis/go-redis/v9"
1515
"go.opentelemetry.io/otel/attribute"
1616
"go.opentelemetry.io/otel/trace"
1717
)

bench/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/cschleiden/go-workflows/backend/sqlite"
1717
"github.com/cschleiden/go-workflows/client"
1818
"github.com/cschleiden/go-workflows/worker"
19-
redisv8 "github.com/go-redis/redis/v8"
19+
redisv8 "github.com/redis/go-redis/v9"
2020
)
2121

2222
var b = flag.String("backend", "redis", "Backend to use. Supported backends are:\n- redis\n- mysql\n- sqlite\n")

0 commit comments

Comments
 (0)