Skip to content

Commit 5629e43

Browse files
committed
Remove dead FlowsManager.Suspend and Workflow flowsManager wiring
1 parent 16d85a2 commit 5629e43

3 files changed

Lines changed: 3 additions & 12 deletions

File tree

Core/Cleipnir.ResilientFunctions/CoreRuntime/FlowsManager.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Diagnostics.CodeAnalysis;
43
using System.Threading;
54
using System.Threading.Tasks;
6-
using Cleipnir.ResilientFunctions.Domain.Exceptions.Commands;
75
using Cleipnir.ResilientFunctions.Storage;
86

97
namespace Cleipnir.ResilientFunctions.CoreRuntime;
@@ -79,8 +77,4 @@ public void CompleteThread(StoredId id)
7977
if (_dict.TryGetValue(id, out var flowState))
8078
flowState.SubflowCompleted();
8179
}
82-
83-
[DoesNotReturn]
84-
public async Task Suspend(StoredId id) => throw new SuspendInvocationException();
85-
8680
}

Core/Cleipnir.ResilientFunctions/CoreRuntime/Invocation/Invoker.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ await _invocationHelper.PersistFunctionInStore(
289289
var queueManager = _invocationHelper.CreateQueueManager(flowId, storedId, effect, flowState, flowTimeouts, _unhandledExceptionHandler);
290290
disposables.Add(queueManager);
291291
var messageWriter = _invocationHelper.CreateMessageWriter(storedId);
292-
var workflow = new Workflow(flowId, storedId, effect, _utilities, correlations, queueManager, _invocationHelper.UtcNow, messageWriter, _flowsManager);
292+
var workflow = new Workflow(flowId, storedId, effect, _utilities, correlations, queueManager, _invocationHelper.UtcNow, messageWriter);
293293

294294
return new PreparedInvocation(
295295
persisted,
@@ -350,8 +350,7 @@ private async Task<PreparedReInvocation> PrepareForReInvocation(StoredId storedI
350350
correlations,
351351
queueManager,
352352
_invocationHelper.UtcNow,
353-
messageWriter,
354-
_flowsManager
353+
messageWriter
355354
);
356355

357356
return new PreparedReInvocation(

Core/Cleipnir.ResilientFunctions/CoreRuntime/Invocation/Workflow.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ public class Workflow
1717
public Correlations Correlations { get; }
1818

1919
private QueueManager _queueManager;
20-
private FlowsManager _flowsManager;
2120
private readonly UtcNow _utcNow;
2221
private MessageWriter MessageWriter { get; }
2322

2423

25-
public Workflow(FlowId flowId, StoredId storedId, Effect effect, Utilities utilities, Correlations correlations, QueueManager queueManager, UtcNow utcNow, MessageWriter messageWriter, FlowsManager flowsManager)
24+
public Workflow(FlowId flowId, StoredId storedId, Effect effect, Utilities utilities, Correlations correlations, QueueManager queueManager, UtcNow utcNow, MessageWriter messageWriter)
2625
{
2726
FlowId = flowId;
2827
StoredId = storedId;
@@ -32,7 +31,6 @@ public Workflow(FlowId flowId, StoredId storedId, Effect effect, Utilities utili
3231
_queueManager = queueManager;
3332
_utcNow = utcNow;
3433
MessageWriter = messageWriter;
35-
_flowsManager = flowsManager;
3634
}
3735

3836
public async Task RegisterCorrelation(string correlation) => await Correlations.Register(correlation);

0 commit comments

Comments
 (0)