Skip to content

Removing possibly outdated code from TrellServer.cs #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions Trell/IPC/Server/TrellServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,38 +115,4 @@ public override Task<Empty> NotifyWorkerReady(WorkerReady request, ServerCallCon
Serilog.Log.Information("Worker {Id} is ready.", request.WorkerId);
return Task.FromResult(MessageConstants.Empty);
}

/// <summary>
/// Called from the worker (on a user's behalf) to log.
/// </summary>
/// <param name="request"></param>
/// <param name="context"></param>
/// <returns></returns>
/// <exception cref="RpcException"></exception>
public override Task<Empty> Log(LogRequest request, ServerCallContext context) {
throw new NotImplementedException();

//if (extensionContainer.Logger is not ITrellLogger logger) {
// return Task.FromResult(MessageConstants.Empty);
//}

//var trellLogLevel = request.LogLevel switch {
// LogLevel.Error => TrellLogLevel.Error,
// LogLevel.Warning => TrellLogLevel.Warn,
// _ => TrellLogLevel.Info,
//};

//if (!executionContextById.TryGetValue(request.ExecutionId, out var ctx)) {
// var metadata = new Metadata {
// { "ExecutionId", request.ExecutionId }
// };
// throw new RpcException(
// new Status(StatusCode.InvalidArgument, "ExecutionId does not exist"),
// metadata);
//}

//logger.Log(ctx, trellLogLevel, request.Message);

//return Task.FromResult(MessageConstants.Empty);
}
}
3 changes: 0 additions & 3 deletions Trell/Protos/TrellServer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ service TrellServer {

// -------------------- START INTERNAL API -----------------------------

// Called from the worker (on a user's behalf) to log.
rpc Log(LogRequest) returns (google.protobuf.Empty);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it does make sense to remove Log, it will make sense to remove LogRequest and any other messages/types it depends on.


// Called from the worker to let server know it is ready to work.
rpc NotifyWorkerReady(WorkerReady) returns (google.protobuf.Empty);

Expand Down