#!/usr/bin/php getNumberOfServers() === 0 && $sl->getQueueLength() === 0) { $sl->log(LOG_NOTICE, 'server sync pool is empty and sync queue is also empty.'); $sl->log(LOG_NOTICE, 'configuration looks like a single node setup.'); $sl->log(LOG_NOTICE, 'ykval-queue daemon terminating.'); exit(0); } # Loop forever and resync do { $start = time(); $sl->reSync($baseParams['__YKVAL_SYNC_OLD_LIMIT__'], $baseParams['__YKVAL_SYNC_RESYNC_TIMEOUT__']); $duration = time() - $start; $sleep_time = max($baseParams['__YKVAL_SYNC_INTERVAL__'] - $duration, 0); } while(sleep($sleep_time)==0);