mirror of
https://github.com/friendica/friendica
synced 2025-04-25 23:50:11 +00:00
Optimized priorities for the automated expiring of items
This commit is contained in:
parent
471056e989
commit
d7de7bb70a
3 changed files with 32 additions and 12 deletions
|
@ -195,7 +195,7 @@ function cron_poll_contacts($argc, $argv) {
|
|||
$contact['priority'] = (($poll_interval !== false) ? intval($poll_interval) : 3);
|
||||
}
|
||||
|
||||
if ($contact['priority'] AND !$force) {
|
||||
if (($contact['priority'] >= 0) AND !$force) {
|
||||
$update = false;
|
||||
|
||||
$t = $contact['last-update'];
|
||||
|
@ -225,11 +225,16 @@ function cron_poll_contacts($argc, $argv) {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
default:
|
||||
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 hour")) {
|
||||
$update = true;
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 15 minute")) {
|
||||
$update = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (!$update) {
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue