public ScheduledTasksController(IScheduledTaskService scheduledTaskService, IModelMapper modelMapper, IDataSerializer dataSerializer, ILogger logger) { _scheduledTaskService = scheduledTaskService; _modelMapper = modelMapper; _dataSerializer = dataSerializer; _logger = logger; }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } // SERVICES IScheduledTaskService scheduledTaskService = app.ApplicationServices.GetService <IScheduledTaskService>(); scheduledTaskService.initTaskService(); // HTTP //app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapGet("/", async context => { string version = typeof(Startup).Assembly.GetName().Version.ToString(); await context.Response.WriteAsync($"AuctionMaster BACKEND - {version}"); }); }); }
public AdminController(IOrchardServices orchardServices, IScheduledTaskService scheduledTaskService, IDateLocalizationServices dateServices) { _orchardServices = orchardServices; _scheduledTaskService = scheduledTaskService; _dateServices = dateServices; T = NullLocalizer.Instance; }
/// <summary> /// creates a new <see cref="System.Threading.Tasks.TaskScheduler"/> /// </summary> /// <param name="logger">access to logging</param> /// <param name="configuration">access to configuration</param> /// <param name="scheduledtaskservice">access to scheduled task data</param> /// <param name="workflowexecutor">executes workflows</param> /// <param name="scriptexecutor">executes scripts</param> /// <param name="workflowcompiler">compiler for workflow data</param> public TaskScheduler(ILogger <TaskScheduler> logger, IConfiguration configuration, IScheduledTaskService scheduledtaskservice, IWorkflowExecutionService workflowexecutor, IScriptExecutionService scriptexecutor, IWorkflowCompiler workflowcompiler) { this.logger = logger; this.configuration = configuration; this.scheduledtaskservice = scheduledtaskservice; this.workflowexecutor = workflowexecutor; this.scriptexecutor = scriptexecutor; this.workflowcompiler = workflowcompiler; }
public NewsController( IUserService userService, INewsService newsService, IScheduledTaskService scheduledTaskService ) : base(userService) { _newsService = newsService; _scheduledTaskService = scheduledTaskService; }
public TasksController( IUserService userService, IScheduledTaskService scheduledTaskService, ITaskLogService taskLogService ) : base(userService) { _scheduledTaskService = scheduledTaskService; _taskLogService = taskLogService; }
public NewsService(IEMailService emailService, ICategoryService categoryService, IGenericRepository <DataEntities.Model.News> newsRepo, IGenericRepository <DataEntities.Model.User> userRepo, IScheduledTaskService scheduledTaskService) { _emailService = emailService; _categoryService = categoryService; _newsRepo = newsRepo; _scheduledTaskService = scheduledTaskService; _userRepo = userRepo; }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); System.Data.Entity.Database.SetInitializer(new MyDataContextDbInitializer()); MogAutomapper.RegisterAutomapper(); IScheduledTaskService scheduledtasks = DependencyResolver.Current.GetService <IScheduledTaskService>(); //var scheduledtasks = new Service.ScheduledTaskService(HttpRuntime.Cache); scheduledtasks.StartService(); }
public UserService(IGenericRepository <DataEntities.Model.User> userRepo, IUserFollowService userFollowService, IGenericRepository <DataEntities.Model.AspNetUser> aspNetUserRepo, ICategoryService categoryService, IProvinceService provinceService, ICountryService countryService, IScheduledTaskService scheduledTaskService, IUserRolesService userRolesService, IGenericRepository <DataEntities.Model.UserFollow> userFollowRepo) { _userFollowService = userFollowService; _userRepo = userRepo; _aspNetUserRepo = aspNetUserRepo; _categoryService = categoryService; _provinceService = provinceService; _countryService = countryService; _scheduledTaskService = scheduledTaskService; _userRolesService = userRolesService; _userFollowRepo = userFollowRepo; }
public ScheduledTaskTasksHandler(IOrchardServices orchardServices, IScheduledTaskManager taskManager, IScheduledTaskService scheduledTaskService, IRepository <ScheduledTaskRecord> repoTasks, IWorkflowManager workflowManager, IRazorExecuteService razorExecuteService, ISweepGenerator sweepGenerator) { _orchardServices = orchardServices; _taskManager = taskManager; _scheduledTaskService = scheduledTaskService; _repoTasks = repoTasks; _workflowManager = workflowManager; _razorExecuteService = razorExecuteService; _sweepGenerator = sweepGenerator; Logger = NullLogger.Instance; }
public SchedulerApiController(IScheduledTaskService taskService) { _taskService = taskService; }
public TaskManager(IScheduledTaskService scheduledTaskService) { _scheduledTaskService = scheduledTaskService; }
public ScheduledTaskController(IScheduledTaskService service) { _service = service; }
public SchedulerApiController(IScheduledTaskService taskService) { if (taskService == null) throw new ArgumentNullException("taskService"); _taskService = taskService; }
public static void RunScheduledTask(ScheduledTask sTask, ITask associatedTask, IScheduledTaskService scheduledTaskService, ILogger logger, bool autoRun = true) { try { sTask.LastStartDateTime = DateTime.UtcNow; sTask.IsRunning = true; scheduledTaskService.Update(sTask); associatedTask.Run(); sTask.LastSuccessDateTime = DateTime.UtcNow; } catch (Exception ex) { sTask.LastEndDateTime = DateTime.UtcNow; logger.LogError <ScheduledTask>(ex, "Failed to complete the task '{0}'", null, associatedTask.SystemName); if (sTask.StopOnError && autoRun) { sTask.Enabled = false; } } finally { sTask.IsRunning = false; //update the task scheduledTaskService.Update(sTask); //dispose the task associatedTask.Dispose(); } }
/// <summary> /// creates a new <see cref="ScheduledTaskController"/> /// </summary> /// <param name="logger">access to logging</param> /// <param name="scheduledtaskservice">access to scheduled task data</param> public ScheduledTaskController(ILogger <ScheduledTaskController> logger, IScheduledTaskService scheduledtaskservice) { this.logger = logger; this.scheduledtaskservice = scheduledtaskservice; }
public TaskController(IScheduledTaskService scheduledTaskService) { this.ScheduledTaskService = scheduledTaskService; }
public ScheduledTaskWorker(ILogger <ScheduledTaskWorker> logger, IScheduledTaskService scheduledTaskService) { _logger = logger; _scheduledTaskService = scheduledTaskService; }
public SchedulerJob(ILogger <SchedulerJob> logger, IScheduledTaskService scheduledTaskService) { _logger = logger; _scheduledTaskService = scheduledTaskService; }
public JobBase() { NeedToBeExectuted = false; _scheduledTaskService = new ScheduledTaskService(); }
public ScheduledTaskController(ILogger <ScheduledTaskController> logger, IScheduledTaskService scheduledTaskService) { _logger = logger; _scheduledTaskService = scheduledTaskService; }
public TaskManager(IScheduledTaskService scheduledTaskService, ILogger logger) { _scheduledTaskService = scheduledTaskService; _logger = logger; }