public void Run(ArticleScheduleTask articleTask)
        {
            var task        = PublishingTask.Create(articleTask);
            var currentTime = _publishingService.GetCurrentDBDateTime();

            if (ShouldProcessTask(task, currentTime))
            {
                var article = _publishingService.PublishAndCloseSchedule(task.Id);
                Logger.Log.Info($"Article [{article.Id}: {article.Name}] has been published on customer code: {_customer.CustomerName}");
            }
        }
Beispiel #2
0
        public void Run(ArticleScheduleTask articleTask)
        {
            var task        = PublishingTask.Create(articleTask);
            var currentTime = _publishingService.GetCurrentDBDateTime();

            if (ShouldProcessTask(task, currentTime))
            {
                var article = _publishingService.PublishAndCloseSchedule(task.Id);
                Logger.Info()
                .Message(
                    "Article [{id}: {name}] has been published on customer code: {customerCode}",
                    article.Id, article.Name, _customer.CustomerName)
                .Write();
            }
        }