Refactor archive loading to optionally start script engine after loading.
parent
eb837defdf
commit
a754ab0e4f
|
@ -285,6 +285,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
/// Dearchive the region embodied in this request.
|
||||
/// </summary>
|
||||
public void DearchiveRegion()
|
||||
{
|
||||
DearchiveRegion(true);
|
||||
}
|
||||
|
||||
public void DearchiveRegion(bool shouldStartScripts)
|
||||
{
|
||||
int successfulAssetRestores = 0;
|
||||
int failedAssetRestores = 0;
|
||||
|
@ -425,6 +430,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
// Start the scripts. We delayed this because we want the OAR to finish loading ASAP, so
|
||||
// that users can enter the scene. If we allow the scripts to start in the loop above
|
||||
// then they significantly increase the time until the OAR finishes loading.
|
||||
if (shouldStartScripts)
|
||||
{
|
||||
WorkManager.RunInThread(o =>
|
||||
{
|
||||
Thread.Sleep(15000);
|
||||
|
@ -441,6 +448,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
sceneContext.SceneObjects.Clear();
|
||||
}
|
||||
}, null, string.Format("ReadArchiveStartScripts (request {0})", m_requestId));
|
||||
}
|
||||
|
||||
m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive");
|
||||
|
||||
|
|
Loading…
Reference in New Issue