의 미러
https://github.com/friendica/friendica
synced 2025-09-07 21:21:52 +02:00
Poller: The maximum number of connections can now be configured
This commit is contained in:
부모
b5100b3154
커밋
211be5bfc5
2개의 변경된 파일과 11개의 추가작업 그리고 4개의 파일을 삭제
|
@ -1252,8 +1252,10 @@ class dfrn {
|
|||
// Update check for this field has to be done differently
|
||||
$datefields = array("name-date", "uri-date");
|
||||
foreach ($datefields AS $field)
|
||||
if (strtotime($contact[$field]) > strtotime($r[0][$field]))
|
||||
if (strtotime($contact[$field]) > strtotime($r[0][$field])) {
|
||||
logger("Difference for contact ".$contact["id"]." in field '".$field."'. Old value: '".$contact[$field]."', new value '".$r[0][$field]."'", LOGGER_DEBUG);
|
||||
$update = true;
|
||||
}
|
||||
|
||||
foreach ($fields AS $field => $data)
|
||||
if ($contact[$field] != $r[0][$field]) {
|
||||
|
|
|
@ -130,9 +130,14 @@ function poller_max_connections_reached() {
|
|||
if (!$r)
|
||||
return false;
|
||||
|
||||
$max = intval($r[0]["Value"]);
|
||||
if ($max == 0)
|
||||
return false;
|
||||
// Fetch the max value from the config. This is needed when the system cannot detect the correct value by itself.
|
||||
$max = get_config("system", "max_connections");
|
||||
|
||||
if ($max == 0) {
|
||||
$max = intval($r[0]["Value"]);
|
||||
if ($max == 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
$r = q("SHOW STATUS WHERE `variable_name` = 'Threads_connected'");
|
||||
if (!$r)
|
||||
|
|
불러오는 중…
테이블 추가
Add a link
Reference in a new issue