Skip to content

Commit 40c2ad0

Browse files
authored
Rewrite transaction code, to make it easier to move to client (#232)
1 parent 42c7ac0 commit 40c2ad0

12 files changed

+428
-412
lines changed

Sources/Valkey/Cluster/ValkeyClusterClient.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public final class ValkeyClusterClient: Sendable {
259259
@inlinable
260260
public func execute(
261261
_ commands: [any ValkeyCommand]
262-
) async -> sending [Result<RESPToken, any Error>] {
262+
) async -> [Result<RESPToken, any Error>] {
263263
guard commands.count > 0 else { return [] }
264264
// get a list of nodes and the commands that should be run on them
265265
do {
@@ -321,7 +321,7 @@ public final class ValkeyClusterClient: Sendable {
321321
func execute<Commands: Collection & Sendable>(
322322
node: ValkeyNodeClient,
323323
commands: Commands
324-
) async throws -> sending [Result<RESPToken, any Error>] where Commands.Element == any ValkeyCommand, Commands.Index == Int {
324+
) async throws -> [Result<RESPToken, any Error>] where Commands.Element == any ValkeyCommand, Commands.Index == Int {
325325
// execute pipeline
326326
var results = await node.execute(commands)
327327
var retryCommands: [(any ValkeyCommand, Int)] = []

Sources/Valkey/Connection/ValkeyConnection+transactions.swift

Lines changed: 0 additions & 292 deletions
This file was deleted.

0 commit comments

Comments
 (0)