Skip to content

Commit

Permalink
SpanList is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
olahallvall committed Apr 26, 2024
1 parent 0a7c220 commit e7eb897
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.DurableTask.Client;
using FlowDance.Common.Models;
using Microsoft.DurableTask.Client;
using Microsoft.Extensions.Logging;

namespace FlowDance.AzureFunctions.Services
Expand All @@ -18,6 +19,8 @@ public void DetermineCompensation(string streamName, DurableTaskClient orchestra
{
// Build a list of Spans from Span events.
var spanEventList = _storage.ReadAllSpanEventsFromStream(streamName);
var spanList = new List<Span>();

if (spanEventList.Any())
{
_logger.LogInformation("Stream has {count} events!", spanEventList.Count);
Expand All @@ -33,7 +36,7 @@ public void DetermineCompensation(string streamName, DurableTaskClient orchestra
}

// ToDo: spanEventList need tags for serialization
string instanceId = orchestrationClient.ScheduleNewOrchestrationInstanceAsync(nameof(Sagas.CompensatingSaga), spanEventList).Result;
string instanceId = orchestrationClient.ScheduleNewOrchestrationInstanceAsync(nameof(Sagas.CompensatingSaga), spanList).Result;
}
}
}

0 comments on commit e7eb897

Please sign in to comment.