public MessagingService(IHubContext <MessagingHub, IMessagingClient> messagingHub,
                                SubscriptionManager subscriptionManager,
                                VideoManager videoManager,
                                JobTrackerService jobTracker,
                                ApiModelFactory apiModelFactory)
        {
            this.messagingHub        = messagingHub;
            this.subscriptionManager = subscriptionManager;
            this.videoManager        = videoManager;
            this.jobTracker          = jobTracker;
            this.apiModelFactory     = apiModelFactory;

            this.subscriptionManager.SubscriptionCreated  += OnSubscriptionCreated;
            this.subscriptionManager.SubscriptionUpdated  += OnSubscriptionUpdated;
            this.subscriptionManager.SubscriptionsDeleted += OnSubscriptionsDeleted;
            this.subscriptionManager.FolderCreated        += OnFolderCreated;
            this.subscriptionManager.FolderUpdated        += OnFolderUpdated;
            this.subscriptionManager.FoldersDeleted       += OnFoldersDeleted;
            this.videoManager.VideoUpdated += OnVideoUpdated;
            this.jobTracker.JobScheduled   += OnJobScheduled;
            this.jobTracker.JobStarted     += OnJobStarted;
            this.jobTracker.JobProgress    += OnJobProgress;
            this.jobTracker.JobCompleted   += OnJobCompleted;
            this.jobTracker.JobFailed      += OnJobFailed;
        }
Example #2
0
 public RegardScheduler(ILogger <RegardScheduler> log,
                        ISchedulerFactory schedulerFactory,
                        JobTrackerService jobTrackerService,
                        DataContext dataContext)
 {
     this.log = log;
     this.schedulerFactory        = schedulerFactory;
     this.jobTrackerService       = jobTrackerService;
     this.dataContext             = dataContext;
     jobTrackerService.JobFailed += JobTrackerService_JobFailed;
 }