From e2ee3a151978d1783baecefd337530bd7fde7c9b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 30 Jun 2016 16:47:12 +0300 Subject: MAINT-6534 Resetting scripts fails due to small timeout --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llcompilequeue.cpp | 11 ++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4912f27e70..ce2d652c37 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3701,6 +3701,17 @@ Value 1 + QueueInventoryFetchTimeout + + Comment + Max time llcompilequeue will wait for inventory fetch to complete (in seconds) + Persist + 1 + Type + F32 + Value + 40.0 + FindLandArea Comment diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index ea2e284305..de7bc1e3c5 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -66,7 +66,6 @@ namespace { const std::string QUEUE_EVENTPUMP_NAME("ScriptActionQueue"); - const F32 TIMEOUT_INVENTORY_FETCH(5.0); class ObjectInventoryFetcher: public LLVOInventoryListener @@ -351,6 +350,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLSD result; LLFloaterCompileQueue *that = hfloater.get(); bool monocompile = that->mMono; + F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout"); if (!that) return false; @@ -382,7 +382,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLExperienceCache::instance().fetchAssociatedExperience(inventory->getParentUUID(), inventory->getUUID(), boost::bind(&LLFloaterCompileQueue::handleHTTPResponse, pump.getName(), _1)); - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); that = hfloater.get(); @@ -429,7 +429,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat &LLFloaterCompileQueue::handleScriptRetrieval, &userData); - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); } @@ -485,7 +485,7 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); } - result = llcoro::suspendUntilEventOnWithTimeout(pump, TIMEOUT_INVENTORY_FETCH, LLSD().with("timeout", LLSD::Boolean(true))); + result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); that = hfloater.get(); if (!that) @@ -735,6 +735,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L LLCoros::set_consuming(true); LLFloaterScriptQueue * floater(NULL); LLEventMailDrop maildrop(QUEUE_EVENTPUMP_NAME, true); + F32 fetch_timeout = gSavedSettings.getF32("QueueInventoryFetchTimeout"); // floater = hfloater.get(); // floater->addProcessingMessage("Starting", @@ -756,7 +757,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L fetcher->fetchInventory(); - LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, TIMEOUT_INVENTORY_FETCH, + LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); if (result.has("timeout") && result["timeout"].asBoolean()) -- cgit v1.2.3