public async Task <Dictionary <string, object> > CheckStatusOnGrpcServices() { var dict = new Dictionary <string, object>(); var discordTimeTask = Ping(() => _grpcServiceFactory.GetDiscordSercviceClient().PingAsync()); var historyTimeTask = Ping(() => _grpcServiceFactory.GetHistorySercviceClient().PingAsync()); var chatTimeTask = Ping(() => _grpcServiceFactory.GetChatSercviceClient().PingAsync()); var steamTimeTask = Ping(() => _grpcServiceFactory.GetSteamServiceClient(new SteamInventoryCacheManager()).PingAsync()); var ticketTimeTask = Ping(() => _grpcServiceFactory.GetTicketSercviceClient().PingAsync()); await Task.WhenAll(chatTimeTask, discordTimeTask, historyTimeTask, steamTimeTask, ticketTimeTask); dict.Add("Discord", discordTimeTask.Result); dict.Add("History", historyTimeTask.Result); dict.Add("Chat", chatTimeTask.Result); dict.Add("steam", steamTimeTask.Result); dict.Add("ticket", ticketTimeTask.Result); return(dict); }
public HistoryController(IGrpcServiceFactory grpcServiceFactory) { _historyService = grpcServiceFactory.GetHistorySercviceClient(); }