Piscal Queue working more resilient to error
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user