This changes JsonFileWriter to make sure that the scheduler is actually shutdown on shutdown() request. The original implementation relied on the scheduled task (QueueConsumer) to shut down it's own executor service. However that is not that reliable - when the audit handler framework is incorrectly used then start() might not have been called and the QueueConsumer is hence never scheduled.
I came across this issue in Wren:AM - there is probably a second part for this issue (calling stop on non-started audit service), but I wanted to fix it here as well as I guess this component should not block the main thread in any case.
This changes
JsonFileWriter
to make sure that the scheduler is actually shutdown onshutdown()
request. The original implementation relied on the scheduled task (QueueConsumer
) to shut down it's own executor service. However that is not that reliable - when the audit handler framework is incorrectly used thenstart()
might not have been called and theQueueConsumer
is hence never scheduled.I came across this issue in Wren:AM - there is probably a second part for this issue (calling
stop
on non-started audit service), but I wanted to fix it here as well as I guess this component should not block the main thread in any case.