Skip to content

Commit 3ff248d

Browse files
committed
Log when job fails
1 parent 0581f48 commit 3ff248d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

IntegrationEngine/MessageQueue/RabbitMqListener.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,15 @@ public void Listen()
4747
var type = IntegrationJobTypes.FirstOrDefault(t => t.FullName.Equals(message));
4848
var integrationJob = Activator.CreateInstance(type) as IIntegrationJob;
4949
integrationJob = AutoWireJob(integrationJob, type);
50-
if (integrationJob != null)
51-
integrationJob.Run();
50+
try
51+
{
52+
if (integrationJob != null)
53+
integrationJob.Run();
54+
}
55+
catch (Exception exception)
56+
{
57+
Log.Error(x => x("Integration job did not run successfully ({0})}", message), exception);
58+
}
5259
}
5360
}
5461
}

0 commit comments

Comments
 (0)