summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-09-11 21:35:51 -0700
committerBharat Mediratta <bharat@menalto.com>2010-09-11 21:36:38 -0700
commitc9c4f96100c5c8304f337f720da2e96b0a4d524a (patch)
tree502a28eeb1edf6bbfdddac8ea38c1e1f204808d1 /modules
parent14ae1fde25eb8b22a2fc92453ba12c8e74aba433 (diff)
Tune timeouts to work better on large installs.
Diffstat (limited to 'modules')
-rw-r--r--modules/exif/helpers/exif_task.php4
-rw-r--r--modules/search/helpers/search_task.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/exif/helpers/exif_task.php b/modules/exif/helpers/exif_task.php
index a754865a..5963d03f 100644
--- a/modules/exif/helpers/exif_task.php
+++ b/modules/exif/helpers/exif_task.php
@@ -50,7 +50,7 @@ class exif_task_Core {
->where("exif_records.item_id", "IS", null)
->or_where("exif_records.dirty", "=", 1)
->close()
- ->find_all() as $item) {
+ ->find_all(100) as $item) {
// The query above can take a long time, so start the timer after its done
// to give ourselves a little time to actually process rows.
if (!isset($start)) {
@@ -60,7 +60,7 @@ class exif_task_Core {
exif::extract($item);
$completed++;
- if (microtime(true) - $start > 1.5) {
+ if (microtime(true) - $start > .75) {
break;
}
}
diff --git a/modules/search/helpers/search_task.php b/modules/search/helpers/search_task.php
index 08f75d66..48a6688b 100644
--- a/modules/search/helpers/search_task.php
+++ b/modules/search/helpers/search_task.php
@@ -47,7 +47,7 @@ class search_task_Core {
->join("search_records", "items.id", "search_records.item_id", "left")
->where("search_records.item_id", "IS", null)
->or_where("search_records.dirty", "=", 1)
- ->find_all() as $item) {
+ ->find_all(100) as $item) {
// The query above can take a long time, so start the timer after its done
// to give ourselves a little time to actually process rows.
if (!isset($start)) {
@@ -57,7 +57,7 @@ class search_task_Core {
search::update($item);
$completed++;
- if (microtime(true) - $start > 1.5) {
+ if (microtime(true) - $start > .75) {
break;
}
}