void jobManager_JobDeleted(object sender, JobActionRequiredEventArgs e) { //The job that was deleted by the jobstore could possibly be a scheduled job that is still in memory awaiting scheduling. //RemoveScheduledJob will remove it if it exists. RemoveScheduledJob(e.Job.Id); TriggerNotify(string.Format("Job with id {0} of type {1} has been deleted.", e.Job.Id, e.Job.JobType.AssemblyQualifiedName)); }
void jobStore_JobDeleted(object sender, JobActionRequiredEventArgs e) { var jobDeleted = JobDeleted; if (jobDeleted != null) { jobDeleted(this, e); } }
void jobManager_ActionRequired(object sender, JobActionRequiredEventArgs e) { if (serviceStatus == ServiceStatus.Running) { TriggerNotify(string.Format("A new job with id {0} of type {1} has been created or updated.", e.Job.Id, e.Job.JobType.AssemblyQualifiedName)); } //Since scheduled jobs are kept in memory for performance, any time a job is updated, the in memory list is checked. lock (scheduledJobs) { if (scheduledJobs.ContainsKey(e.Job.Id)) { scheduledJobs[e.Job.Id] = e.Job; } } checkForJobEnqueue = true; }