When processing incoming attachments via HG, if a request for uuid gathering or final asset import takes too long remove remaining requests from same user to prevent hold up of other user's incoming attachments.

This improves upon the earlier naive simply queueing immplementation.
Threshold is 30 seconds.  If this happens to a user they can relog and fetch will be reattempted.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-11-06 01:15:22 +00:00
parent 06a5d6e9ef
commit aeae34505f
4 changed files with 121 additions and 29 deletions

View File

@@ -655,7 +655,22 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Is gathering complete?
/// </summary>
public bool GatheringComplete { get { return m_assetUuidsToInspect.Count <= 0; } }
public bool Complete { get { return m_assetUuidsToInspect.Count <= 0; } }
/// <summary>
/// Gets the next UUID to inspect.
/// </summary>
/// <value>If there is no next UUID then returns null</value>
public UUID? NextUuidToInspect
{
get
{
if (Complete)
return null;
else
return m_assetUuidsToInspect.Peek();
}
}
protected IAssetService m_assetService;
@@ -693,7 +708,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns>false if gathering is already complete, true otherwise</returns>
public bool GatherNext()
{
if (GatheringComplete)
if (Complete)
return false;
GetAssetUuids(m_assetUuidsToInspect.Dequeue());
@@ -707,7 +722,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <returns>false if gathering is already complete, true otherwise</returns>
public bool GatherAll()
{
if (GatheringComplete)
if (Complete)
return false;
while (GatherNext());