예제 #1
0
        /// <nodoc/>
        public WorkerNotificationManager(WorkerService workerService, EngineSchedule schedule, IPipExecutionEnvironment environment, DistributionServices services)
        {
            WorkerService        = workerService;
            DistributionServices = services;

            m_scheduler   = schedule.Scheduler;
            m_environment = environment;

            m_forwardingEventListener = new ForwardingEventListener(this);
            m_sendCancellationSource  = new CancellationTokenSource();
            m_pipResultListener       = new PipResultListener(this, schedule, environment);
            m_sendThread = new Thread(() => SendNotifications(m_sendCancellationSource.Token));
        }
예제 #2
0
        public void Start(IOrchestratorClient orchestratorClient, EngineSchedule schedule, IPipResultSerializer serializer)
        {
            Contract.AssertNotNull(orchestratorClient);

            m_orchestratorClient      = orchestratorClient;
            m_executionLogTarget      = new NotifyOrchestratorExecutionLogTarget(this, schedule);
            m_forwardingEventListener = new ForwardingEventListener(this);
            m_pipResultListener       = new PipResultListener(this, serializer);
            m_sendCancellationSource  = new CancellationTokenSource();
            m_sendThread = new Thread(() => SendNotifications(m_sendCancellationSource.Token));
            m_sendThread.Start();

            m_started = true;
        }