public void ReprocessFailedQueue()
        {
            var queue = QueueToReprocess.Select(x => x.Item1).ToList();

            QueueToReprocess.Clear();
            ProcessQueue(queue);
        }
        private bool ExecuteNodeCommand(Node node)
        {
            bool commandExecutedSuccessfully;

            try
            {
                node.Command.Execute();
                commandExecutedSuccessfully = true;
            }
            catch (Exception ex)
            {
                var nodeFailed = new Tuple <Node, Exception>(node, ex);
                QueueToReprocess.Add(nodeFailed);
                commandExecutedSuccessfully = false;
                HasAnyNodeFailed            = true;

                Logger.AddLog(new Log
                {
                    Message      = string.Format("Node command \"{0}\" failed", node.Command.CommandType.ToString()),
                    Level        = LogLevel.Error,
                    ErrorDetails = string.Format("Exception: {0} ; InnerException: {1} ;", ex.Message, ex.InnerException?.Message),
                    Date         = DateTime.Now
                });
            }

            return(commandExecutedSuccessfully);
        }