diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs | 14 |
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 | ||
76 | namespace OpenSim.Region.OptionalModules.World.AutoBackup | 80 | namespace 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. |