Minimal poll intervall

This commit is contained in:
Michael 2017-05-24 08:21:05 +00:00
parent d7de7bb70a
commit d2dd0b3248
3 changed files with 9 additions and 9 deletions

View file

@ -54,6 +54,7 @@ Example: To set the directory value please add this line to your .htconfig.php:
* **max_batch_queue** - Default value is 1000.
* **max_processes_backend** - Maximum number of concurrent database processes for background tasks. Default value is 5.
* **max_processes_frontend** - Maximum number of concurrent database processes for foreground tasks. Default value is 20.
* **min_poll_interval** - minimal distance in minutes between two polls for a contact. Default is 1. Reasonable values are between 1 and 59.
* **memcache** (Boolean) - Use memcache. To use memcache the PECL extension "memcache" has to be installed and activated.
* **memcache_host** - Hostname of the memcache daemon. Default is '127.0.0.1'.
* **memcache_port** - Portnumber of the memcache daemon. Default is 11211.

View file

@ -122,6 +122,8 @@ function cron_poll_contacts($argc, $argv) {
$force = true;
}
$min_poll_interval = Config::get('system', 'min_poll_interval', 1);
$sql_extra = (($manual_id) ? " AND `id` = $manual_id " : "");
reload_plugins();
@ -231,7 +233,7 @@ function cron_poll_contacts($argc, $argv) {
break;
case 0:
default:
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 15 minute")) {
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + ".$min_poll_interval." minute")) {
$update = true;
}
break;

View file

@ -2290,15 +2290,12 @@ function drop_item($id, $interactive = true) {
}
}
// send the notification upstream/downstream when it is one of our posts
// We don't have to do this for foreign posts
/// @todo Check if we still can delete foreign comments on our own post
if ($item['wall'] OR $item['origin']) {
// send the notification upstream/downstream
// The priority depends on how the deletion is done.
$drop_id = intval($item['id']);
$priority = ($interactive ? PRIORITY_HIGH : PRIORITY_LOW);
proc_run($priority, "include/notifier.php", "drop", $drop_id);
}
if (! $interactive) {
return $owner;