Hardened against transient broadcast failure
This commit is contained in:
@@ -71,12 +71,20 @@ namespace Swarmops.Logic.Support
|
||||
|
||||
// Run the Run() function
|
||||
|
||||
bool transientError = false;
|
||||
|
||||
try
|
||||
{
|
||||
Console.WriteLine(" - Executing BSO: " + className);
|
||||
|
||||
order.Run();
|
||||
}
|
||||
catch (TryAgainException)
|
||||
{
|
||||
transientError = true;
|
||||
|
||||
// Don't close this backend service order - it will retry
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
if (!order.HasWorkerThread)
|
||||
@@ -88,7 +96,7 @@ namespace Swarmops.Logic.Support
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!order.HasWorkerThread)
|
||||
if (!order.HasWorkerThread && !transientError)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user