mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-12 15:54:27 +01:00
Modify ykval-queue daemon.
- don't run ykval-queue for single node configurations.
This commit is contained in:
parent
54dfc6edb6
commit
a0e3715dbb
12
ykval-queue
12
ykval-queue
@ -34,16 +34,20 @@ require_once 'ykval-synclib.php';
|
|||||||
require_once 'ykval-config.php';
|
require_once 'ykval-config.php';
|
||||||
require_once 'ykval-log.php';
|
require_once 'ykval-log.php';
|
||||||
|
|
||||||
// FIXME
|
|
||||||
// if sync pool is empty && db queue is empty:
|
|
||||||
// exit
|
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
// don't die if db connection goes away
|
// don't die if db connection goes away
|
||||||
// (e.g. during mysql restart or upgrade).
|
// (e.g. during mysql restart or upgrade).
|
||||||
|
|
||||||
$sl = new SyncLib('ykval-queue:synclib');
|
$sl = new SyncLib('ykval-queue:synclib');
|
||||||
|
|
||||||
|
if ($sl->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
|
# Loop forever and resync
|
||||||
do {
|
do {
|
||||||
$sl->reSync($baseParams['__YKVAL_SYNC_OLD_LIMIT__'],
|
$sl->reSync($baseParams['__YKVAL_SYNC_OLD_LIMIT__'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user