public static string GetJobType(IJobSettings job) { if (job is DataUpdateJobSettings) return DataUpdate; if (job is EconomicReleaseUpdateJobSettings) return EconomicRelease; return ""; }
private IJobViewModel GetJobViewModel(IJobSettings job) { if (job is DataUpdateJobSettings) { return(new DataUpdateJobViewModel((DataUpdateJobSettings)job, _client, DialogCoordinator, this)); } if (job is EconomicReleaseUpdateJobSettings) { return(new EconomicReleaseUpdateJobViewModel((EconomicReleaseUpdateJobSettings)job, _client, DialogCoordinator, this)); } if (job is DividendUpdateJobSettings) { return(new DividendUpdateJobViewModel((DividendUpdateJobSettings)job, _client, DialogCoordinator, this)); } if (job is EarningsUpdateJobSettings) { return(new EarningsUpdateJobViewModel((EarningsUpdateJobSettings)job, _client, DialogCoordinator, this)); } throw new NotImplementedException(); }
private string GetJobPathFromType(IJobSettings job) { if (job is DataUpdateJobSettings) { return("/jobs/dataupdatejobs"); } if (job is EconomicReleaseUpdateJobSettings) { return("/jobs/economicreleaseupdatejobs"); } if (job is DividendUpdateJobSettings) { return("/jobs/dividendupdatejobs"); } if (job is EarningsUpdateJobSettings) { return("/jobs/earningsupdatejobs"); } throw new NotImplementedException(); }
public static string GetJobType(IJobSettings job) { if (job is DataUpdateJobSettings) { return(DataUpdate); } if (job is EconomicReleaseUpdateJobSettings) { return(EconomicRelease); } if (job is DividendUpdateJobSettings) { return(DividendUpdate); } if (job is EarningsUpdateJobSettings) { return(EarningsUpdate); } return(""); }
private void AddJob(string selectedJob) { IJobSettings job = null; //create the jobdetails and add if (selectedJob == "Data Update") { job = new DataUpdateJobSettings { Name = GetJobName("DataUpdateJob"), UseTag = true, Frequency = BarSize.OneDay, Time = new TimeSpan(8, 0, 0), WeekDaysOnly = true }; } else if (selectedJob == "Economic Release Update") { job = new EconomicReleaseUpdateJobSettings { Name = GetJobName("EconomicReleaseUpdateJob"), BusinessDaysBack = 1, BusinessDaysAhead = 7, DataSource = "FXStreet" }; } var jobVm = GetJobViewModel(job); Jobs.Add(jobVm); SelectedJob = jobVm; }
public void DeleteJob(IJobSettings job) { _logger.Info($"Deleting job {JobTypes.GetJobType(job)}.{job.Name}"); _scheduler.DeleteJob(new JobKey(job.Name, JobTypes.GetJobType(job))); }
public HeartBeatJob(IServices services, IAdminServices adminServices, IJobSettings settings) : base(services, adminServices, settings) { }
public SendInvoiceJob(IServices services, IAdminServices adminServices, IJobSettings settings) : base(services, adminServices, settings) { }
public CreateRCTIJob(IServices services, IAdminServices adminServices, IJobSettings settings) : base(services, adminServices, settings) { }
public NotifyBeforeEndTimeJob(IServices services, IAdminServices adminServices, IJobSettings settings) : base(services, adminServices, settings) { }
protected BaseScheduledJob(IServices services, IAdminServices adminServices, IJobSettings settings) { Services = services; AdminServices = adminServices; JobSettings = settings; }
public ClearLogsJob(IServices services, IAdminServices adminServices, IJobSettings settings) : base(services, adminServices, settings) { }
public CheckTrialUserJob(IServices services, IAdminServices adminServices, IJobSettings settings) : base(services, adminServices, settings) { }
public static void ScheduleJob(IScheduler scheduler, IJobSettings job) { ScheduleJobs(scheduler, new[] { job }); }
public DownloadRecordJob(IServices services, IAdminServices adminServices, IJobSettings settings) : base(services, adminServices, settings) { }