Ejemplo n.º 1
0
        private async Task TaskExecutionProc()
        {
            ITask     task;
            Exception exception;

            if (!m_namesvc.IsMaster)
            {
                return;
            }
            task = await m_taskqueue.GetTask(m_cancel);

            if (task == null)
            {
                return;
            }
            try
            {
                await task.Execute(m_cancel);

                exception = null;
            }
            catch (Exception ex) { exception = ex; }
            if (null == exception)
            {
                if (task is ChainedTasks ctask && !ctask.Finished)
                {
                    await m_taskqueue.UpdateTask(task);
                }
                else
                {
                    await m_taskqueue.RemoveTask(task);
                }
            }
Ejemplo n.º 2
0
 public ErrorTypes RemoveTask(object key)
 {
     return(m_oTaskQueue.RemoveTask(key));
 }