From 06a5d6e9ef163abaadbf81c98b54c042751fae89 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Nov 2014 19:36:53 +0000 Subject: Introduce an IteratingUuidGatherer where each fetch from the asset service (iteration) can be controlled by the caller. This is to enable an imminent change where incoming HG scene object fetching can assess the time taken by each request rather than being forced to perform all requests in one call. Soon, this will replace the existing UuidGatherer since it is both simpler and more flexible. --- .../EntityTransfer/HGEntityTransferModule.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 522de79..be409bb 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs @@ -571,9 +571,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer "[HG ENTITY TRANSFER MODULE]: Incoming attachment {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url); - Dictionary ids = new Dictionary(); - HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url); - uuidGatherer.GatherAssetUuids(so, ids); + IteratingHGUuidGatherer uuidGatherer = new IteratingHGUuidGatherer(Scene.AssetService, url); + uuidGatherer.RecordAssetUuids(so); + + // XXX: We will shortly use this iterating mechanism to check if a fetch is taking too long + // but just for now we will simply fetch everything. If this was permanent could use + // GatherAll() + while (uuidGatherer.GatherNext()) + m_log.DebugFormat( + "[HG ENTITY TRANSFER]: Gathered attachment {0} for HG user {1} with asset server {2}", + so.Name, so.OwnerID, url); + + IDictionary ids = uuidGatherer.GetGatheredUuids(); + + m_log.DebugFormat( + "[HG ENTITY TRANSFER]: Fetching {0} assets for attachment {1} for HG user {2} with asset server {3}", + ids.Count, so.Name, so.OwnerID, url); foreach (KeyValuePair kvp in ids) uuidGatherer.FetchAsset(kvp.Key); -- cgit v1.1