public RegistryWatcherJobContext(Application application, Image image, int imageIndex) { Job = JobBuilder.Create <RegistryWatcherJob>() .WithIdentity($"rwatcher-{application.Name}-{image.Repository}-{imageIndex}", "containerrepowatcher") .UsingJobData("ImageRepository", image.Repository) .UsingJobData("Application", application.Name) .UsingJobData("ImageIndex", imageIndex) .Build(); Trigger = TriggerBuilder.Create() .WithIdentity($"rwatcher-trig-{application.Name}-{image.Repository}-{imageIndex}", "containerrepowatcher") .StartNow() .WithSimpleSchedule(x => x .WithIntervalInSeconds(10) .RepeatForever() ) .ForJob(Job) .Build(); }
public RegistryWatcherKey(Application application, Image image) { _application = application; _image = image; }