Esempio n. 1
0
        public async Task StartWatchingImageRepository(Application application)
        {
            _log.LogInformation("Adding application {name}, beginning watch of repositories", application.Name);
            for (var i = 0; i < application.Images.Count; i++)
            {
                var image = application.Images[i];

                var key        = new RegistryWatcherKey(application, image);
                var jobContext = new RegistryWatcherJobContext(application, image, i);

                if (_jobs.TryAdd(key, jobContext))
                {
                    await _scheduler.ScheduleJob(jobContext.Job, jobContext.Trigger);
                }
            }
        }
Esempio n. 2
0
 protected bool Equals(RegistryWatcherKey other)
 {
     return(_application.Equals(other._application) && _image.Equals(other._image));
 }