Minimal poll intervall

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

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']) {
$drop_id = intval($item['id']);
$priority = ($interactive ? PRIORITY_HIGH : PRIORITY_LOW);
// 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);
}
proc_run($priority, "include/notifier.php", "drop", $drop_id);
if (! $interactive) {
return $owner;