added k8s config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-08 15:48:56 +02:00
parent e194f0ed10
commit cca6aff3c0
18 changed files with 5559 additions and 197 deletions

View File

@@ -1,24 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using OutputServiceTSDB.RabbitMQ;
using Sentry;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace OutputServiceTSDB
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
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();
}
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Worker>();
});
private static void ConfigureServices(IServiceCollection services)
{
services.AddLogging(configure => configure.AddConsole())
.Configure<LoggerFilterOptions>(options => options.MinLevel = LogLevel.Information)
.AddTransient<RabbitMQWorker>();
}
}
}