public void RemovePendingAndAddSuccessLog(CreateTaskInfo taskInfo, string timeSpan) { DataProvider.CreateTaskDao.Delete(taskInfo.ID); var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.PublishmentSystemID, CreateTaskManager.GetTaskName(taskInfo), timeSpan, true, string.Empty, DateTime.Now); DataProvider.CreateTaskLogDao.Insert(taskLog); }
public void RemovePendingAndAddFailureLog(CreateTaskInfo taskInfo, Exception ex) { DataProvider.CreateTaskDao.Delete(taskInfo.ID); var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.PublishmentSystemID, CreateTaskManager.GetTaskName(taskInfo), string.Empty, false, ex.Message, DateTime.Now); DataProvider.CreateTaskLogDao.Insert(taskLog); }
public void AddFailureLog(CreateTaskInfo taskInfo, Exception ex) { var taskLogs = GetTaskLogs(taskInfo.SiteId); var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.SiteId, taskInfo.ChannelId, taskInfo.ContentId, taskInfo.TemplateId, taskInfo.Name, string.Empty, false, ex.Message, DateTime.Now); if (taskLogs.Count > 20) { taskLogs.RemoveAt(20); } taskLogs.Add(taskLog); }
public void AddSuccessLog(CreateTaskInfo taskInfo, string timeSpan) { var taskLogs = GetTaskLogs(taskInfo.SiteId); var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.SiteId, taskInfo.ChannelId, taskInfo.ContentId, taskInfo.TemplateId, taskInfo.Name, timeSpan, true, string.Empty, DateTime.Now); if (taskLogs.Count > 20) { taskLogs.RemoveAt(20); } taskLogs.Add(taskLog); }
public static void AddFailureLog(CreateTaskInfo taskInfo, Exception ex) { var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.SiteId, taskInfo.ChannelId, taskInfo.ContentId, taskInfo.FileTemplateId, taskInfo.SpecialId, taskInfo.Name, string.Empty, false, ex.Message, DateTime.Now); lock (LockObject) { if (TaskLogs.Count > 20) { TaskLogs.RemoveAt(20); } TaskLogs.Insert(0, taskLog); } }
public static void AddSuccessLog(CreateTaskInfo taskInfo, string timeSpan) { var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.SiteId, taskInfo.ChannelId, taskInfo.ContentId, taskInfo.FileTemplateId, taskInfo.SpecialId, taskInfo.Name, timeSpan, true, string.Empty, DateTime.Now); lock (LockObject) { if (TaskLogs.Count > 20) { TaskLogs.RemoveAt(20); } TaskLogs.Insert(0, taskLog); } }
public void RemovePendingAndAddFailureLog(CreateTaskInfo taskInfo, Exception ex) { var pendingTasks = GetPendingTasks(taskInfo.PublishmentSystemID); var taskLogs = GetTaskLogs(taskInfo.PublishmentSystemID); pendingTasks.Remove(taskInfo); var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.PublishmentSystemID, CreateTaskManager.GetTaskName(taskInfo), string.Empty, false, ex.Message, DateTime.Now); if (taskLogs.Count > 20) { taskLogs.RemoveAt(20); } taskLogs.Add(taskLog); }
public void RemovePendingAndAddSuccessLog(CreateTaskInfo taskInfo, string timeSpan) { var pendingTasks = GetPendingTasks(taskInfo.PublishmentSystemID); var taskLogs = GetTaskLogs(taskInfo.PublishmentSystemID); pendingTasks.Remove(taskInfo); var taskLog = new CreateTaskLogInfo(0, taskInfo.CreateType, taskInfo.PublishmentSystemID, CreateTaskManager.GetTaskName(taskInfo), timeSpan, true, string.Empty, DateTime.Now); if (taskLogs.Count > 20) { taskLogs.RemoveAt(20); } taskLogs.Add(taskLog); }
public CreateTaskSummaryItem(CreateTaskLogInfo logInfo) { siteId = logInfo.SiteId; channelId = logInfo.ChannelId; contentId = logInfo.ContentId; fileTemplateId = logInfo.FileTemplateId; specialId = logInfo.SpecialId; type = ECreateTypeUtils.GetText(logInfo.CreateType); name = logInfo.TaskName; timeSpan = logInfo.TimeSpan; isPending = false; isSuccess = logInfo.IsSuccess; errorMessage = logInfo.ErrorMessage; }