Skip to content

Commit 98ea822

Browse files
committed
Removed unused functionality from InvocationHelper
1 parent 8ed0778 commit 98ea822

File tree

2 files changed

+3
-30
lines changed

2 files changed

+3
-30
lines changed

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

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,15 @@ internal class InvocationHelper<TParam, TReturn>
1414
private readonly ShutdownCoordinator _shutdownCoordinator;
1515
private readonly IFunctionStore _functionStore;
1616
private readonly SettingsWithDefaults _settings;
17-
private readonly Func<FunctionId, MessageWriter?> _messageWriterFunc;
1817

1918
private ISerializer Serializer { get; }
2019

21-
public InvocationHelper(
22-
SettingsWithDefaults settings,
23-
IFunctionStore functionStore,
24-
ShutdownCoordinator shutdownCoordinator,
25-
Func<FunctionId, MessageWriter> messageWriterFunc)
20+
public InvocationHelper(SettingsWithDefaults settings, IFunctionStore functionStore, ShutdownCoordinator shutdownCoordinator)
2621
{
2722
_settings = settings;
2823

2924
Serializer = new ErrorHandlingDecorator(settings.Serializer);
3025
_shutdownCoordinator = shutdownCoordinator;
31-
_messageWriterFunc = messageWriterFunc;
3226
_functionStore = functionStore;
3327
}
3428

@@ -261,27 +255,6 @@ internal record PreparedReInvocation(TParam? Param, int Epoch, string? DefaultSt
261255

262256
public IDisposable StartLeaseUpdater(FunctionId functionId, int epoch = 0)
263257
=> LeaseUpdater.CreateAndStart(functionId, epoch, _functionStore, _settings);
264-
265-
public async Task<bool> SetFunctionState(
266-
FunctionId functionId,
267-
Status status,
268-
TParam param,
269-
DateTime? postponeUntil,
270-
Exception? exception,
271-
int expectedEpoch
272-
)
273-
{
274-
var serializer = _settings.Serializer;
275-
return await _functionStore.SetFunctionState(
276-
functionId,
277-
status,
278-
param: serializer.SerializeParameter(param),
279-
result: null,
280-
exception == null ? null : serializer.SerializeException(exception),
281-
postponeUntil?.Ticks,
282-
expectedEpoch
283-
);
284-
}
285258

286259
public async Task<bool> SetFunctionState(
287260
FunctionId functionId,

Core/Cleipnir.ResilientFunctions/FunctionsRegistry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public FuncRegistration<TParam, TReturn> RegisterFunc<TParam, TReturn>(
226226
return (FuncRegistration<TParam, TReturn>)_functions[functionTypeId];
227227

228228
var settingsWithDefaults = _settings.Merge(settings);
229-
var invocationHelper = new InvocationHelper<TParam, TReturn>(settingsWithDefaults, _functionStore, _shutdownCoordinator, GetMessageWriter);
229+
var invocationHelper = new InvocationHelper<TParam, TReturn>(settingsWithDefaults, _functionStore, _shutdownCoordinator);
230230
var rFuncInvoker = new Invoker<TParam, TReturn>(
231231
functionTypeId,
232232
inner,
@@ -279,7 +279,7 @@ private ActionRegistration<TParam> RegisterAction<TParam>(
279279
return (ActionRegistration<TParam>)_functions[functionTypeId];
280280

281281
var settingsWithDefaults = _settings.Merge(settings);
282-
var invocationHelper = new InvocationHelper<TParam, Unit>(settingsWithDefaults, _functionStore, _shutdownCoordinator, GetMessageWriter);
282+
var invocationHelper = new InvocationHelper<TParam, Unit>(settingsWithDefaults, _functionStore, _shutdownCoordinator);
283283
var rActionInvoker = new Invoker<TParam, Unit>(
284284
functionTypeId,
285285
inner,

0 commit comments

Comments
 (0)