Actually use the renew code
We have the code to check once a day and renew, but currently it's just in a script directory. This change adds an event listener hook to check and renew subscriptions daily.
This commit is contained in:
parent
0ba53edd96
commit
df46f123dd
|
@ -1351,4 +1351,19 @@ class OStatusPlugin extends Plugin
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onCronDaily()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$sub = FeedSub::renewalCheck();
|
||||||
|
} catch (NoResultException $e) {
|
||||||
|
common_log(LOG_INFO, "There were no expiring feeds.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ($sub->fetch()) {
|
||||||
|
common_log(LOG_INFO, "Renewing feed subscription\n\tExp.: {$sub->sub_end}\n\tFeed: {$sub->uri}\n\tHub: {$sub->huburi}");
|
||||||
|
$sub->renew();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user