Skip to content

Commit

Permalink
fix: database does not support running user defined functions (TaskSt…
Browse files Browse the repository at this point in the history
…atus.ToGrpcStatus)
  • Loading branch information
aneojgurhem committed Sep 26, 2023
1 parent a0a62ef commit 47c0ad8
Showing 1 changed file with 37 additions and 26 deletions.
63 changes: 37 additions & 26 deletions Common/src/gRPC/Services/WatchToGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,39 +277,50 @@ await channel.Writer.WriteAsync(cur,
await Task.Factory.StartNew(async () =>
{
await foreach (var esr in taskTable_.FindTasksAsync(internalTasksFilter,
cur => new EventSubscriptionResponse
cur => new
{
NewTask = new EventSubscriptionResponse.Types.NewTask
{
ParentTaskIds =
{
cur.ParentTaskIds,
},
DataDependencies =
{
cur.DataDependencies,
},
ExpectedOutputKeys =
{
cur.ExpectedOutputIds,
},
OriginTaskId = cur.InitialTaskId,
PayloadId = cur.PayloadId,
RetryOfIds =
{
cur.RetryOfIds,
},
Status = cur.Status.ToGrpcStatus(),
TaskId = cur.TaskId,
},
SessionId = cur.SessionId,
cur.ParentTaskIds,
cur.DataDependencies,
cur.ExpectedOutputIds,
cur.InitialTaskId,
cur.PayloadId,
cur.RetryOfIds,
cur.Status,
cur.TaskId,
cur.SessionId,
},
cancellationToken)
.ConfigureAwait(false))
{
logger_.LogDebug("New task from db {task}",
esr);
await channel.Writer.WriteAsync(esr,
await channel.Writer.WriteAsync(new EventSubscriptionResponse
{
NewTask = new EventSubscriptionResponse.Types.NewTask
{
PayloadId = esr.PayloadId,
Status = esr.Status.ToGrpcStatus(),
DataDependencies =
{
esr.DataDependencies,
},
ExpectedOutputKeys =
{
esr.ExpectedOutputIds,
},
OriginTaskId = esr.InitialTaskId,
ParentTaskIds =
{
esr.ParentTaskIds,
},
RetryOfIds =
{
esr.RetryOfIds,
},
TaskId = esr.TaskId,
},
SessionId = esr.SessionId,
},
CancellationToken.None)
.ConfigureAwait(false);
}
Expand Down

0 comments on commit 47c0ad8

Please sign in to comment.