예제 #1
0
        public bool Execute(string subject, IQueueTools tools, IOutput log)
        {
            bool alreadyExists = tools.Exists(subject);

            if (!alreadyExists)
            {
                log.Warn(subject, "Doesn't exist, nothing to truncate.");
                return(false);
            }

            tools.DeleteAllMessages(subject);
            log.OK(subject, "Truncated.");

            return(true);
        }
예제 #2
0
        public bool Execute(string subject, IQueueTools tools, IOutput log)
        {
            bool alreadyExists = tools.Exists(subject);

            if (!alreadyExists)
            {
                log.Warn(subject, "Doesn't exist, nothing to truncate.");
                return false;
            }

            tools.DeleteAllMessages(subject);
            log.OK(subject, "Truncated.");

            return true;
        }