aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r--Zotlabs/Daemon/Cron.php8
-rw-r--r--Zotlabs/Daemon/Poller.php10
2 files changed, 9 insertions, 9 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index b8bcbe3a2..640f06102 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -52,7 +52,7 @@ class Cron {
require_once('include/account.php');
remove_expired_registrations();
- $interval = get_config('system', 'delivery_interval', 3);
+ $interval = get_config('queueworker', 'queue_interval', 500000);
// expire any expired items
@@ -69,7 +69,7 @@ class Cron {
Master::Summon(['Notifier', 'drop', $rr['id']]);
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
}
@@ -102,7 +102,7 @@ class Cron {
Master::Summon(array('Directory', $rr['channel_id'], 'force'));
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
}
@@ -159,7 +159,7 @@ class Cron {
Master::Summon(array('Notifier', 'wall-new', $rr['id']));
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
}
diff --git a/Zotlabs/Daemon/Poller.php b/Zotlabs/Daemon/Poller.php
index b43b814f7..0fdc3da16 100644
--- a/Zotlabs/Daemon/Poller.php
+++ b/Zotlabs/Daemon/Poller.php
@@ -17,13 +17,13 @@ class Poller {
}
}
+ $interval = get_config('queueworker', 'queue_interval', 500000);
- $interval = intval(get_config('system', 'poll_interval'));
+/*
if (!$interval) {
$interval = ((get_config('system', 'delivery_interval') === false) ? 3 : intval(get_config('system', 'delivery_interval')));
}
-/*
// Check for a lockfile. If it exists, but is over an hour old, it's stale. Ignore it.
$lockfile = 'store/[data]/poller';
if ((file_exists($lockfile)) && (filemtime($lockfile) > (time() - 3600))
@@ -109,7 +109,7 @@ class Poller {
Master::Summon(['Onepoll', $contact['abook_id']]);
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
@@ -175,7 +175,7 @@ class Poller {
Master::Summon(['Onepoll', $contact['abook_id']]);
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
}
@@ -201,7 +201,7 @@ class Poller {
Master::Summon(['Onedirsync', $rr['ud_id']]);
if ($interval) {
- @time_sleep_until(microtime(true) + (float)$interval);
+ usleep($interval);
}
}
}