diff --git a/src/ConductorSharp.Client/ConductorSharp.Client.csproj b/src/ConductorSharp.Client/ConductorSharp.Client.csproj index 9e6de6c..bdca5fb 100644 --- a/src/ConductorSharp.Client/ConductorSharp.Client.csproj +++ b/src/ConductorSharp.Client/ConductorSharp.Client.csproj @@ -6,7 +6,7 @@ Codaxy Codaxy ConductorSharp.Client - 3.7.0 + 3.7.1 Client library for Netflix Conductor, with some additional quality of life features. https://github.com/codaxy/conductor-sharp netflix;conductor diff --git a/src/ConductorSharp.Engine/ConductorSharp.Engine.csproj b/src/ConductorSharp.Engine/ConductorSharp.Engine.csproj index 261e77b..7830ab2 100644 --- a/src/ConductorSharp.Engine/ConductorSharp.Engine.csproj +++ b/src/ConductorSharp.Engine/ConductorSharp.Engine.csproj @@ -6,7 +6,7 @@ Codaxy Codaxy ConductorSharp.Engine - 3.7.0 + 3.7.1 Client library for Netflix Conductor, with some additional quality of life features. https://github.com/codaxy/conductor-sharp netflix;conductor diff --git a/src/ConductorSharp.Engine/ExecutionManager.cs b/src/ConductorSharp.Engine/ExecutionManager.cs index 4c58595..259b4ab 100644 --- a/src/ConductorSharp.Engine/ExecutionManager.cs +++ b/src/ConductorSharp.Engine/ExecutionManager.cs @@ -160,8 +160,8 @@ CancellationToken cancellationToken // TODO: Check what the operation and payload type are var externalStorageLocation = await _taskManager.GetExternalStorageLocationAsync( pollResponse.ExternalInputPayloadStoragePath, - "", - "", + "READ", + "TASK_INPUT", cancellationToken ); diff --git a/src/ConductorSharp.Engine/TypePollSpreadingExecutionManager.cs b/src/ConductorSharp.Engine/TypePollSpreadingExecutionManager.cs index e314284..fc12ac3 100644 --- a/src/ConductorSharp.Engine/TypePollSpreadingExecutionManager.cs +++ b/src/ConductorSharp.Engine/TypePollSpreadingExecutionManager.cs @@ -67,8 +67,7 @@ public async Task StartAsync(CancellationToken cancellationToken) .Where(a => a.Value > 0) .ToDictionary(a => a.Key, a => a.Value); - var scheduledWorkers = _registeredWorkers.Where(a => queuedTasks.ContainsKey(GetQueueTaskName(a))) - .ToList(); + var scheduledWorkers = _registeredWorkers.Where(a => queuedTasks.ContainsKey(GetQueueTaskName(a))).ToList(); currentSleepInterval = _pollTimingStrategy.CalculateDelay( queuedTasks, @@ -77,8 +76,7 @@ public async Task StartAsync(CancellationToken cancellationToken) currentSleepInterval ); - scheduledWorkers = - _pollOrderStrategy.CalculateOrder(queuedTasks, scheduledWorkers, _semaphore.CurrentCount); + scheduledWorkers = _pollOrderStrategy.CalculateOrder(queuedTasks, scheduledWorkers, _semaphore.CurrentCount); foreach (var scheduledWorker in scheduledWorkers) { @@ -171,14 +169,13 @@ CancellationToken cancellationToken // TODO: Check what the operation and payload type are var externalStorageLocation = await _taskManager.GetExternalStorageLocationAsync( pollResponse.ExternalInputPayloadStoragePath, - "", - "", + "READ", + "TASK_INPUT", cancellationToken ); // TODO: iffy - var file = await _externalPayloadService.GetExternalStorageDataAsync(externalStorageLocation.Path, - tokenHolder.CancellationToken); + var file = await _externalPayloadService.GetExternalStorageDataAsync(externalStorageLocation.Path, tokenHolder.CancellationToken); using TextReader textReader = new StreamReader(file.Stream); var json = await textReader.ReadToEndAsync(); @@ -190,8 +187,7 @@ CancellationToken cancellationToken } var inputType = GetInputType(scheduledWorker.TaskType); - var inputData = SerializationHelper.DictonaryToObject(inputType, pollResponse.InputData, - ConductorConstants.IoJsonSerializerSettings); + var inputData = SerializationHelper.DictonaryToObject(inputType, pollResponse.InputData, ConductorConstants.IoJsonSerializerSettings); // Poll response data can be huge (if read from external storage) // We can save memory by not holding reference to pollResponse.InputData after it is parsed pollResponse.InputData = null; @@ -219,9 +215,7 @@ await _taskManager.UpdateAsync( { TaskId = pollResponse.TaskId, Status = TaskResultStatus.COMPLETED, - OutputData = - SerializationHelper.ObjectToDictionary(response, - ConductorConstants.IoJsonSerializerSettings), + OutputData = SerializationHelper.ObjectToDictionary(response, ConductorConstants.IoJsonSerializerSettings), WorkflowInstanceId = pollResponse.WorkflowInstanceId }, tokenHolder.CancellationToken @@ -237,9 +231,7 @@ await _taskManager.UpdateAsync( pollResponse.WorkflowInstanceId ); } - catch (OperationCanceledException) when - (cancellationToken - .IsCancellationRequested) // This is fine since we know cancellationToken comes from background service + catch (OperationCanceledException) when (cancellationToken.IsCancellationRequested) // This is fine since we know cancellationToken comes from background service { _logger.LogWarning( "Cancelling task {Task}(id={TaskId}) of workflow {Workflow}(id={WorkflowId}) due to background service shutdown", @@ -273,8 +265,7 @@ await Task.WhenAll( TaskId = pollResponse.TaskId, Status = TaskResultStatus.FAILED, ReasonForIncompletion = exception.Message, - OutputData = SerializationHelper.ObjectToDictionary(errorMessage, - ConductorConstants.IoJsonSerializerSettings), + OutputData = SerializationHelper.ObjectToDictionary(errorMessage, ConductorConstants.IoJsonSerializerSettings), WorkflowInstanceId = pollResponse?.WorkflowInstanceId }, tokenHolder.CancellationToken @@ -286,4 +277,4 @@ await Task.WhenAll( } } } -} \ No newline at end of file +} diff --git a/src/ConductorSharp.KafkaCancellationNotifier/ConductorSharp.KafkaCancellationNotifier.csproj b/src/ConductorSharp.KafkaCancellationNotifier/ConductorSharp.KafkaCancellationNotifier.csproj index 8c45b40..6081e8f 100644 --- a/src/ConductorSharp.KafkaCancellationNotifier/ConductorSharp.KafkaCancellationNotifier.csproj +++ b/src/ConductorSharp.KafkaCancellationNotifier/ConductorSharp.KafkaCancellationNotifier.csproj @@ -4,7 +4,7 @@ net6.0 enable enable - 3.7.0 + 3.7.1 Codaxy Codaxy diff --git a/src/ConductorSharp.Patterns/ConductorSharp.Patterns.csproj b/src/ConductorSharp.Patterns/ConductorSharp.Patterns.csproj index ac4fdb6..5e1fdab 100644 --- a/src/ConductorSharp.Patterns/ConductorSharp.Patterns.csproj +++ b/src/ConductorSharp.Patterns/ConductorSharp.Patterns.csproj @@ -7,7 +7,7 @@ False Codaxy Codaxy - 3.7.0 + 3.7.1