output-service-tsdb/Program.cs
Kristóf Torma cca6aff3c0
All checks were successful
continuous-integration/drone/push Build is passing
added k8s config
2020-04-08 15:48:56 +02:00

30 lines
1.0 KiB
C#

using OutputServiceTSDB.RabbitMQ;
using Sentry;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace OutputServiceTSDB
{
public class Program
{
public static void Main(string[] args)
{
using (SentrySdk.Init("https://744f5d479bdb4478b386173b92d081ac@sentry.kmlabz.com/12"))
{
var serviceCollection = new ServiceCollection();
ConfigureServices(serviceCollection);
var serviceProvider = serviceCollection.BuildServiceProvider();
RabbitMQWorker rabbitMQWorker = serviceProvider.GetService<RabbitMQWorker>();
rabbitMQWorker.ProcessMessages();
}
}
private static void ConfigureServices(IServiceCollection services)
{
services.AddLogging(configure => configure.AddConsole())
.Configure<LoggerFilterOptions>(options => options.MinLevel = LogLevel.Information)
.AddTransient<RabbitMQWorker>();
}
}
}