mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 04:23:42 +00:00
Merge pull request #1341 from nupplaphil/feat/keyvalue_storage
[various] Replace addon "last" config entries with key-value entries
This commit is contained in:
commit
5af972bb22
3 changed files with 6 additions and 6 deletions
|
@ -164,7 +164,7 @@ function leistungsschutzrecht_is_member_site(string $url): bool
|
||||||
|
|
||||||
function leistungsschutzrecht_cron(App $a, $b)
|
function leistungsschutzrecht_cron(App $a, $b)
|
||||||
{
|
{
|
||||||
$last = DI::config()->get('leistungsschutzrecht', 'last_poll');
|
$last = DI::keyValue()->get('leistungsschutzrecht_last_poll');
|
||||||
|
|
||||||
if ($last) {
|
if ($last) {
|
||||||
$next = $last + 86400;
|
$next = $last + 86400;
|
||||||
|
@ -174,5 +174,5 @@ function leistungsschutzrecht_cron(App $a, $b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
leistungsschutzrecht_fetchsites();
|
leistungsschutzrecht_fetchsites();
|
||||||
DI::config()->set('leistungsschutzrecht', 'last_poll', time());
|
DI::keyValue()->set('leistungsschutzrecht_last_poll', time());
|
||||||
}
|
}
|
||||||
|
|
|
@ -631,7 +631,7 @@ function pumpio_sync(App $a)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$last = DI::config()->get('pumpio', 'last_poll');
|
$last = DI::keyValue()->get('pumpio_last_poll');
|
||||||
|
|
||||||
$poll_interval = intval(DI::config()->get('pumpio', 'poll_interval', PUMPIO_DEFAULT_POLL_INTERVAL));
|
$poll_interval = intval(DI::config()->get('pumpio', 'poll_interval', PUMPIO_DEFAULT_POLL_INTERVAL));
|
||||||
|
|
||||||
|
@ -685,7 +685,7 @@ function pumpio_sync(App $a)
|
||||||
|
|
||||||
Logger::notice('pumpio: cron_end');
|
Logger::notice('pumpio: cron_end');
|
||||||
|
|
||||||
DI::config()->set('pumpio', 'last_poll', time());
|
DI::keyValue()->set('pumpio_last_poll', time());
|
||||||
}
|
}
|
||||||
|
|
||||||
function pumpio_cron(App $a, $b)
|
function pumpio_cron(App $a, $b)
|
||||||
|
|
|
@ -999,7 +999,7 @@ function twitter_addon_admin(App $a, string &$o)
|
||||||
|
|
||||||
function twitter_cron(App $a)
|
function twitter_cron(App $a)
|
||||||
{
|
{
|
||||||
$last = DI::config()->get('twitter', 'last_poll');
|
$last = DI::keyValue()->get('twitter_last_poll');
|
||||||
|
|
||||||
$poll_interval = intval(DI::config()->get('twitter', 'poll_interval'));
|
$poll_interval = intval(DI::config()->get('twitter', 'poll_interval'));
|
||||||
if (!$poll_interval) {
|
if (!$poll_interval) {
|
||||||
|
@ -1057,7 +1057,7 @@ function twitter_cron(App $a)
|
||||||
|
|
||||||
Logger::notice('twitter: cron_end');
|
Logger::notice('twitter: cron_end');
|
||||||
|
|
||||||
DI::config()->set('twitter', 'last_poll', time());
|
DI::keyValue()->set('twitter_last_poll', time());
|
||||||
}
|
}
|
||||||
|
|
||||||
function twitter_expire(App $a)
|
function twitter_expire(App $a)
|
||||||
|
|
Loading…
Reference in a new issue