public NetworkMetricJob(INetworkMetricsRepository repository, IMetricsAgentClient metricsAgentClient, IAgentsRepositorySingle repositoryAgents) { _repository = repository; _metricsAgentClient = metricsAgentClient; _repositoryAgents = repositoryAgents; }
public AgentsJob(IAgentsRepositorySingle repository) { _repository = repository; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IMigrationRunner migrationRunner, IAgentsRepositorySingle agentsRepository) { migrationRunner.MigrateUp(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); var AgentsJob = new AgentsJob(agentsRepository); AgentsJob.Delete(); AgentsJob.Execute(null); }