aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorSean McNamara2011-02-28 11:54:07 -0500
committerSean McNamara2011-02-28 11:54:07 -0500
commitb3c42e952f24a5c280a3691e1f75912e21c77323 (patch)
tree1efc5da5a2587d313b6f07a470ddf33e9d0a023d /OpenSim/Region
parentFirst pass at busy heuristics. Compile-tested only. (diff)
downloadopensim-SC_OLD-b3c42e952f24a5c280a3691e1f75912e21c77323.zip
opensim-SC_OLD-b3c42e952f24a5c280a3691e1f75912e21c77323.tar.gz
opensim-SC_OLD-b3c42e952f24a5c280a3691e1f75912e21c77323.tar.bz2
opensim-SC_OLD-b3c42e952f24a5c280a3691e1f75912e21c77323.tar.xz
Fix small bug with remove region; update settings docs.
Our impl of IRegionModuleBase.RemoveRegion didn't remove the scene from the states map.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
index 98127b7..7660342 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
@@ -71,6 +71,10 @@ using OpenSim.Region.Framework.Scenes;
71 * "Overwrite": Always save to file named "${AutoBackupDir}/RegionName.oar", even if we have to overwrite an existing file. 71 * "Overwrite": Always save to file named "${AutoBackupDir}/RegionName.oar", even if we have to overwrite an existing file.
72 * AutoBackupDir: String. Default: "." (the current directory). 72 * AutoBackupDir: String. Default: "." (the current directory).
73 * A directory (absolute or relative) where backups should be saved. 73 * A directory (absolute or relative) where backups should be saved.
74 * AutoBackupDilationThreshold: float. Default: 0.5. Lower bound on time dilation required for BusyCheck heuristics to pass.
75 * If the time dilation is below this value, don't take a backup right now.
76 * AutoBackupAgentThreshold: int. Default: 10. Upper bound on # of agents in region required for BusyCheck heuristics to pass.
77 * If the number of agents is greater than this value, don't take a backup right now.
74 * */ 78 * */
75 79
76namespace OpenSim.Region.OptionalModules.World.AutoBackup 80namespace OpenSim.Region.OptionalModules.World.AutoBackup
@@ -91,7 +95,6 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
91 //AutoBackupModuleState: Auto-Backup state for one region (scene). 95 //AutoBackupModuleState: Auto-Backup state for one region (scene).
92 public class AutoBackupModuleState 96 public class AutoBackupModuleState
93 { 97 {
94 private readonly IScene m_scene;
95 private bool m_enabled = false; 98 private bool m_enabled = false;
96 private NamingType m_naming = NamingType.TIME; 99 private NamingType m_naming = NamingType.TIME;
97 private Timer m_timer = null; 100 private Timer m_timer = null;
@@ -99,11 +102,9 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
99 private string m_script = null; 102 private string m_script = null;
100 private string m_dir = "."; 103 private string m_dir = ".";
101 104
102 public AutoBackupModuleState (IScene scene) 105 public AutoBackupModuleState ()
103 { 106 {
104 m_scene = scene; 107
105 if (scene == null)
106 throw new NullReferenceException ("Required parameter missing for AutoBackupModuleState constructor");
107 } 108 }
108 109
109 public void SetEnabled (bool b) 110 public void SetEnabled (bool b)
@@ -226,6 +227,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
226 timers.Remove (timer.Interval); 227 timers.Remove (timer.Interval);
227 timer.Close (); 228 timer.Close ();
228 } 229 }
230 states.Remove(scene);
229 } 231 }
230 232
231 void IRegionModuleBase.RegionLoaded (Framework.Scenes.Scene scene) 233 void IRegionModuleBase.RegionLoaded (Framework.Scenes.Scene scene)
@@ -238,7 +240,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
238 return; 240 return;
239 241
240 string sRegionName = scene.RegionInfo.RegionName; 242 string sRegionName = scene.RegionInfo.RegionName;
241 AutoBackupModuleState st = new AutoBackupModuleState (scene); 243 AutoBackupModuleState st = new AutoBackupModuleState ();
242 states.Add (scene, st); 244 states.Add (scene, st);
243 245
244 //Read the config settings and set variables. 246 //Read the config settings and set variables.