public static string GetAttachmentMoverProgress() { var messages = string.Join("\n", AttachmentMover.DumpProgress().ToArray().Reverse()) + "\n"; var progress = new { AttachmentMover.Running, Messages = string.IsNullOrWhiteSpace(messages) ? string.Empty : messages, }; return(js.Serialize(progress)); }
public static string StopMovingAttachmentsToFileSystem() { try { AttachmentMover.Stop(); return(js.Serialize(new { Success = true })); } catch (Exception e) { return(js.Serialize(new { Success = false, e.Message, })); } }
public static string StartMovingAttachmentsToFileSystem() { try { //AttachmentMover.Start(runFake: true); AttachmentMover.Start(); return(js.Serialize(new { Success = true, AttachmentMover.Running, })); } catch (Exception e) { return(js.Serialize(new { Success = false, e.Message, })); } }