Skip to content

Commit e3474d5

Browse files
committed
Add some logging statements around job run calls
1 parent e671e69 commit e3474d5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

IntegrationEngine/JobProcessor/RabbitMQListener.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,17 @@ public void Listen(CancellationToken cancellationToken)
6565
var integrationJob = UnityContainer.Resolve(type) as IIntegrationJob;
6666
if (integrationJob != null)
6767
{
68-
if (integrationJob is IParameterizedJob)
69-
(integrationJob as IParameterizedJob).Parameters = message.Parameters;
70-
integrationJob.Run();
68+
if (integrationJob is IParameterizedJob) {
69+
var parameterizedJob = integrationJob as IParameterizedJob;
70+
parameterizedJob.Parameters = message.Parameters;
71+
Log.Info(x => x("Running job: {0} with parameters {1}", integrationJob, message.Parameters));
72+
parameterizedJob.Run();
73+
}
74+
else {
75+
Log.Info(x => x("Running job: {0}", integrationJob));
76+
integrationJob.Run();
77+
}
78+
Log.Info(x => x("Integration job ran successfully: {0}", integrationJob));
7179
}
7280
}
7381
catch (OperationCanceledException exception)

0 commit comments

Comments
 (0)