
A new scheduled job that will purge (hard delete) any PriceDataUsageDetails
that are older than 30 days was added, which will run every day at midnight by default.
The usage date threshold can be configured via the purgePriceDataUsageDetailsOlderThan scheduled job detail.
Please refer to Purge PriceDataUsageDetails Scheduled Job for more details.
Users can now view the execution details of any scheduled job similar to that of Import/Export and Reindex jobs.
Execution details like Trigger Time, Start Time, End Time, Execution Status, Notes and Errors can be viewed. This is supported by the new domain ScheduledJobExecutionDetail
.
A new flag trackExecutionDetails
has been added to the ScheduledJob
domain to enable/disable tracking of execution details.
On the Admin UI, a new section Execution Details is displayed when the trackExecutionDetails
flag is enabled. It contains a grid that displays the execution details of the scheduled job as shown in the screenshot below.
This is powered by the new ScheduledJobStartedEvent
and ScheduledJobCompletedEvent
events that are published when a scheduled job starts and completes respectively.
As an example, the PURGE_PRICE_DATA_USAGE_DETAIL
scheduled job has been configured OOB to track its execution details. Any scheduled jobs that you desire to track the execution details of would have to be
explicitly enable and add logic to opt in.
Enable the flag trackExecutionDetails
for the scheduled job.
Add the following spring cloud stream binding in the service where the scheduled job listener is located:
Add ScheduledJobStartedEventProducer
and ScheduledJobCompletedEventProducer
to @EnableBinding
in the
AutoConfiguration class.
Lastly, update the scheduled job listener wire the producers and add the methods for tracking the start and end times of the job.
spring:
cloud:
stream:
bindings:
scheduledJobStartedEventOutput:
destination: scheduledJobStarted
scheduledJobCompletedEventOutput:
destination: scheduledJobCompleted