implement service class for feed polling frequenecy, fixed a service class bug, moved service class stuff from plugin to account.php where it belongs and load that by default instead of on demand

This commit is contained in:
friendica
2014-09-03 19:07:14 -07:00
parent d93f7d688d
commit 844087bc71
9 changed files with 92 additions and 96 deletions

View File

@@ -151,7 +151,6 @@ function poller_run($argv, $argc){
q("delete from notify where seen = 1 and date < UTC_TIMESTAMP() - INTERVAL 30 DAY");
// expire any expired accounts
require_once('include/account.php');
downgrade_accounts();
// If this is a directory server, request a sync with an upstream
@@ -264,7 +263,9 @@ function poller_run($argv, $argc){
$c = $contact['abook_connected'];
if($contact['abook_flags'] & ABOOK_FLAG_FEED) {
$min = intval(get_config('system','minimum_feedcheck_minutes'));
$min = service_class_fetch($contact['abook_channel'],'minimum_feedcheck_minutes');
if(! $min)
$min = intval(get_config('system','minimum_feedcheck_minutes'));
if(! $min)
$min = 60;
$x = datetime_convert('UTC','UTC',"now - $min minutes");