Merge branch 'master' of git.gnu.io:gnu/gnu-social into nightly

Conflicts:
	plugins/OStatus/OStatusPlugin.php

master vs. nightly thing
This commit is contained in:
Mikael Nordfeldth
2015-11-05 16:16:02 +01:00
7 changed files with 281 additions and 24 deletions

View File

@@ -118,6 +118,9 @@ class OStatusPlugin extends Plugin
// Incoming from a foreign PuSH hub
$qm->connect('pushin', 'PushInQueueHandler');
// Re-subscribe feeds that need renewal
$qm->connect('pushrenew', 'PushRenewQueueHandler');
return true;
}
@@ -1396,4 +1399,20 @@ class OStatusPlugin extends Plugin
// Since we completed the salmon slap, we discontinue the event
return false;
}
public function onCronDaily()
{
try {
$sub = FeedSub::renewalCheck();
} catch (NoResultException $e) {
common_log(LOG_INFO, "There were no expiring feeds.");
return;
}
$qm = QueueManager::get();
while ($sub->fetch()) {
$item = array('feedsub_id' => $sub->id);
$qm->enqueue($item, 'pushrenew');
}
}
}