diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-08-30 20:32:10 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-08-30 20:32:10 -0400 |
commit | d5f83d92521dbf838b1fc1fad2716efc3122c6b7 (patch) | |
tree | 5318e5c4ad04f8415b2d6d57cddcd03c85b6560d /lib/queuehandler.php | |
parent | ea5b12916342910d9df18af69f82a4f3aedb6d4b (diff) |
switch around how XMLStream does processing
darcs-hash:20080831003210-84dde-92ccffd5b2e1d50963b18babd93c70fb1d20cdba.gz
Diffstat (limited to 'lib/queuehandler.php')
-rw-r--r-- | lib/queuehandler.php | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/queuehandler.php b/lib/queuehandler.php index ba7a93ab2..3115ea38d 100644 --- a/lib/queuehandler.php +++ b/lib/queuehandler.php @@ -81,21 +81,18 @@ class QueueHandler { $this->log(LOG_WARNING, 'queue item for notice that does not exist'); } $qi->delete(); - $this->idle(); + $this->idle(0); } else { $this->clear_old_claims(); - $start = microtime(); - $this->idle(); - $used = microtime() - $start; - if ($used < 1000000) { - usleep(1000000 - $used); - } + $this->idle(5); } } while (true); } - function idle() { - return true; + function idle($timeout=0) { + if ($timeout>0) { + sleep($timeout); + } } function clear_old_claims() { |