Esempio n. 1
0
        private void NewWorkEventHandler(object sender, NewServiceListenerItemEventArgs eventArgs)
        {
            GlassLog.Record(GlassTelemetryEventTypes.GLASS_SERVICE_ENGINE_NEW_WORK_EVENT, $"new work from {eventArgs.GlassServiceAlias} listener.");          

            var activeListener = _listeners[eventArgs.GlassServiceId];

            var work = activeListener.GetWork();

            var convertTask = new ConversionTask(activeListener.GlassListenerAlias, work, _workers);

            convertTask.Success     += ConvertTask_Success;
            convertTask.Timeout     += ConvertTask_Timeout;
            convertTask.HardFailure += ConvertTask_HardFailure;

            _inprogressTasks.Add(convertTask.GlassConversionTaskId, convertTask);
        }
Esempio n. 2
0
 public ConversionTaskEventArgs(ConversionTask task)
 {
     _task = task;
 }