|
|
@ -248,27 +248,27 @@ class RPC extends Handler_Protected {
|
|
|
|
if (Config::get(Config::DB_TYPE) == "pgsql") {
|
|
|
|
if (Config::get(Config::DB_TYPE) == "pgsql") {
|
|
|
|
$update_limit_qpart = "AND ((
|
|
|
|
$update_limit_qpart = "AND ((
|
|
|
|
update_interval = 0
|
|
|
|
update_interval = 0
|
|
|
|
AND p.value != '-1'
|
|
|
|
AND (p.value IS NULL OR p.value != '-1')
|
|
|
|
AND last_updated < NOW() - CAST((COALESCE(p.value, '$default_interval') || ' minutes') AS INTERVAL)
|
|
|
|
AND last_updated < NOW() - CAST((COALESCE(p.value, '$default_interval') || ' minutes') AS INTERVAL)
|
|
|
|
) OR (
|
|
|
|
) OR (
|
|
|
|
update_interval > 0
|
|
|
|
update_interval > 0
|
|
|
|
AND last_updated < NOW() - CAST((update_interval || ' minutes') AS INTERVAL)
|
|
|
|
AND last_updated < NOW() - CAST((update_interval || ' minutes') AS INTERVAL)
|
|
|
|
) OR (
|
|
|
|
) OR (
|
|
|
|
update_interval >= 0
|
|
|
|
update_interval >= 0
|
|
|
|
AND p.value != '-1'
|
|
|
|
AND (p.value IS NULL OR p.value != '-1')
|
|
|
|
AND (last_updated = '1970-01-01 00:00:00' OR last_updated IS NULL)
|
|
|
|
AND (last_updated = '1970-01-01 00:00:00' OR last_updated IS NULL)
|
|
|
|
))";
|
|
|
|
))";
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$update_limit_qpart = "AND ((
|
|
|
|
$update_limit_qpart = "AND ((
|
|
|
|
update_interval = 0
|
|
|
|
update_interval = 0
|
|
|
|
AND p.value != '-1'
|
|
|
|
AND (p.value IS NULL OR p.value != '-1')
|
|
|
|
AND last_updated < DATE_SUB(NOW(), INTERVAL CONVERT(COALESCE(p.value, '$default_interval'), SIGNED INTEGER) MINUTE)
|
|
|
|
AND last_updated < DATE_SUB(NOW(), INTERVAL CONVERT(COALESCE(p.value, '$default_interval'), SIGNED INTEGER) MINUTE)
|
|
|
|
) OR (
|
|
|
|
) OR (
|
|
|
|
update_interval > 0
|
|
|
|
update_interval > 0
|
|
|
|
AND last_updated < DATE_SUB(NOW(), INTERVAL update_interval MINUTE)
|
|
|
|
AND last_updated < DATE_SUB(NOW(), INTERVAL update_interval MINUTE)
|
|
|
|
) OR (
|
|
|
|
) OR (
|
|
|
|
update_interval >= 0
|
|
|
|
update_interval >= 0
|
|
|
|
AND p.value != '-1'
|
|
|
|
AND (p.value IS NULL OR p.value != '-1')
|
|
|
|
AND (last_updated = '1970-01-01 00:00:00' OR last_updated IS NULL)
|
|
|
|
AND (last_updated = '1970-01-01 00:00:00' OR last_updated IS NULL)
|
|
|
|
))";
|
|
|
|
))";
|
|
|
|
}
|
|
|
|
}
|
|
|
|