using LeafWeb.Core.Entities; using LeafWeb.Core.Remote; namespace LeafWeb.Web.Services { public class Cleanup : PiscalQueueWorker { protected override void DoWorkInternal(LeafInput leafInput) { try { Logger.Info("LeafInput: {0}, Cleanup", leafInput.Id); PiscalService.Cleanup(leafInput); } catch (PiscalClientException ex) { var errorMessage = FormatException(ex, ex.LeafInputId); Logger.Error(errorMessage, ex); // log the error, but ignore the cleanup issue for now Logger.Info("LeafInput: {0}, Cleanup - likely has not occurred", leafInput.Id); } } } }