HI i'm trying to configure the Jobrunr code, specially the Custom Delete Policy: [https://www.jobrunr.io/en/documentation/pro/custom-delete-policy/][1]
Im trying a way to configure the delete on success and failure based on the application.properties value. But for some reason its not allowing me to do it, and it shows unable to parse the value provided. Code snippet below for the job.
@Recurring(id = "some-id-job", cron = "${some_crontab}")
@Job(name = "some-job", deleteOnFailure = "${jobrunr.cleanup.failedJobsDuration}",
deleteOnSuccess = "${jobrunr.cleanup.succeededJobsDuration}")
@Transactional
public void initiateAutoSyncPayment(){
log.debug("Initiating Job.....");
someJob = jobService.enqueueAutoSyncPayment(company.getCompanyId()));
}
Application properties snippet
jobrunr.cleanup.succeededJobsDuration=P1D! -- delete after one day.
jobrunr.cleanup.failedJobsDuration=P7D! -- delete after seven days
That is only available in the paying Pro version, I'm sorry .