public static string StopRemovingAttachmentHistory() { AttachmentHistoryRemover.Stop(); return(js.Serialize(new { Success = true, AttachmentHistoryRemover.Running, })); }
public static string GetAttachmentHistoryRemoverProgress() { var messages = string.Join("\n", AttachmentHistoryRemover.DumpProgress().ToArray().Reverse()) + "\n"; var progress = new { AttachmentHistoryRemover.Running, Messages = string.IsNullOrWhiteSpace(messages) ? string.Empty : messages, }; return(js.Serialize(progress)); }
public static string StartRemovingAttachmentHistory(int daysBeforeLastModified, int maxAllowedVersions) { try { AttachmentHistoryRemover.Start(daysBeforeLastModified, maxAllowedVersions); return(js.Serialize(new { Success = true, Running = true, })); } catch (Exception e) { return(js.Serialize(new { Success = false, e.Message, })); } }