<basic-scaling>
<max-instances>2</max-instances>
<idle-timeout>2m</idle-timeout>
</basic-scaling>
private void doPolling() {
//Queue notificationQueue = QueueFactory.getQueue("notification-delivery");
//PushNotificationWorker worker = new PushNotificationWorker(notificationQueue);
while (!LifecycleManager.getInstance().isShuttingDown()) {
boolean tasksProcessed = false;
ApiProxy.flushLogs();
if (!tasksProcessed) {
// Wait before trying to lease tasks again.
try {
Thread.sleep(MILLISECONDS_TO_WAIT_WHEN_NO_TASKS_LEASED);
} catch (InterruptedException e) {
return;
}
}
}
log.info("Instance is shutting down");
}
Do you know how can we solve that
Thread.sleep(MILLISECONDS_TO_WAIT_WHEN_NO_TASKS_LEASED);