I use spring boot and somewhere in code I have following code:
@SchedulerLock(name = "onlineIngestionTask", lockAtMostFor = 900, lockAtLeastFor = 900)
public void pullTasksFromRemote() throws InterruptedException {
logger.info("task-started");
Thread.sleep(500);
logger.info("task-stopped");
}
Is there way to replace it via programmatic style?