// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IPhoebusService _phoebusService, IIntermeioService _intermeioService, IAnaliseService _analiseService, IPosService _posService, IExtratoService _extratoService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } // app.UseHttpsRedirection(); app.UseHangfireDashboard(); app.UseCors(x => x.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); app.UseAuthentication(); app.UseMvc(); #region Background Jobs HangFire BackgroundJob.Schedule(() => _phoebusService.RequestPhoebus(DateTime.Now, "00:00:00", "23:59:59"), TimeSpan.FromMinutes(60)); RecurringJob.AddOrUpdate(() => _intermeioService.GetAllBaseIntermeio(), Cron.Daily(12, 30)); RecurringJob.AddOrUpdate(() => _analiseService.ValidationAnalise(), Cron.Daily(12, 30)); RecurringJob.AddOrUpdate(() => _posService.RequestPosByIntermeio(), Cron.Daily(12, 30)); RecurringJob.AddOrUpdate(() => _extratoService.ValidationAluguel(), Cron.Daily(12, 30)); #endregion }
public AnalisesController(SuporteContext context, IAnaliseService analiseService, IPhoebusService phoebusService, IIntermeioService intermeioService) { _context = context; _analiseService = analiseService; _phoebusService = phoebusService; _intermeioService = intermeioService; }
public AnaliseController(IAnaliseService analiseService, IAnaliseRepository analiseRepository, IMapper mapper) { _analiseRepository = analiseRepository; _analiseService = analiseService; _mapper = mapper; }