commit
a3152a96c2
6 changed files with 25 additions and 21 deletions
|
@ -219,7 +219,7 @@ class App
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->profiler = $profiler;
|
$this->profiler = $profiler;
|
||||||
$this->basePath = $this->config->getCache()->get('system', 'basepath');
|
$this->basePath = $this->config->get('system', 'basepath');
|
||||||
|
|
||||||
if (!Core\System::isDirectoryUsable($this->basePath, false)) {
|
if (!Core\System::isDirectoryUsable($this->basePath, false)) {
|
||||||
throw new Exception('Basepath \'' . $this->basePath . '\' isn\'t usable.');
|
throw new Exception('Basepath \'' . $this->basePath . '\' isn\'t usable.');
|
||||||
|
|
|
@ -57,14 +57,15 @@ class JITConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAdapte
|
||||||
// manage array value
|
// manage array value
|
||||||
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
|
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
|
||||||
|
|
||||||
|
if (isset($value) && $value !== '') {
|
||||||
$this->in_db[$cat][$key] = true;
|
$this->in_db[$cat][$key] = true;
|
||||||
return $value;
|
return $value;
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->in_db[$cat][$key] = false;
|
$this->in_db[$cat][$key] = false;
|
||||||
return '!<unset>!';
|
return '!<unset>!';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
|
@ -57,14 +57,15 @@ class JITPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfigAdap
|
||||||
// manage array value
|
// manage array value
|
||||||
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $pconfig['v']) ? unserialize($pconfig['v']) : $pconfig['v']);
|
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $pconfig['v']) ? unserialize($pconfig['v']) : $pconfig['v']);
|
||||||
|
|
||||||
|
if (isset($value) && $value !== '') {
|
||||||
$this->in_db[$uid][$cat][$key] = true;
|
$this->in_db[$uid][$cat][$key] = true;
|
||||||
return $value;
|
return $value;
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->in_db[$uid][$cat][$key] = false;
|
$this->in_db[$uid][$cat][$key] = false;
|
||||||
return '!<unset>!';
|
return '!<unset>!';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
|
@ -55,12 +55,13 @@ class PreloadConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAd
|
||||||
// manage array value
|
// manage array value
|
||||||
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
|
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
|
||||||
|
|
||||||
|
if (isset($value) && $value !== '') {
|
||||||
return $value;
|
return $value;
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return '!<unset>!';
|
return '!<unset>!';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
|
@ -71,11 +71,12 @@ class PreloadPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfig
|
||||||
// manage array value
|
// manage array value
|
||||||
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
|
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
|
||||||
|
|
||||||
|
if (isset($value) && $value !== '') {
|
||||||
return $value;
|
return $value;
|
||||||
} else {
|
|
||||||
return '!<unset>!';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '!<unset>!';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
|
@ -439,7 +439,7 @@ class Worker
|
||||||
|
|
||||||
Logger::log("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - done in ".number_format($duration, 4)." seconds. Process PID: ".$new_process_id);
|
Logger::log("Process ".$mypid." - Prio ".$queue["priority"]." - ID ".$queue["id"].": ".$funcname." - done in ".number_format($duration, 4)." seconds. Process PID: ".$new_process_id);
|
||||||
|
|
||||||
$a->getProfiler()->saveLog("ID " . $queue["id"] . ": " . $funcname);
|
$a->getProfiler()->saveLog($a->getLogger(), "ID " . $queue["id"] . ": " . $funcname);
|
||||||
|
|
||||||
$cooldown = Config::get("system", "worker_cooldown", 0);
|
$cooldown = Config::get("system", "worker_cooldown", 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue