Make timer auto-respawn.
parent
7fa8ed0c47
commit
bb1f03abc6
|
@ -275,9 +275,11 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||||
st.SetEnabled(false);
|
st.SetEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
st.SetTimer(new Timer(interval)); //Milliseconds -> minutes
|
Timer tim = new Timer(interval);
|
||||||
timers.Add(interval, st.GetTimer());
|
st.SetTimer(tim); //Milliseconds -> minutes
|
||||||
st.GetTimer().Elapsed += HandleElapsed;
|
timers.Add(interval, tim);
|
||||||
|
tim.Elapsed += HandleElapsed;
|
||||||
|
tim.AutoReset = True;
|
||||||
m_log.Debug("[AUTO BACKUP MODULE]: New timer for " + interval + " msec for region " + sRegionName);
|
m_log.Debug("[AUTO BACKUP MODULE]: New timer for " + interval + " msec for region " + sRegionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,6 +353,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
|
||||||
{
|
{
|
||||||
IRegionArchiverModule iram = scene.RequestModuleInterface<IRegionArchiverModule>();
|
IRegionArchiverModule iram = scene.RequestModuleInterface<IRegionArchiverModule>();
|
||||||
string savePath = BuildOarPath(scene.RegionInfo.RegionName, state.GetBackupDir(), state.GetNamingType());
|
string savePath = BuildOarPath(scene.RegionInfo.RegionName, state.GetBackupDir(), state.GetNamingType());
|
||||||
|
m_log.Debug("[AUTO BACKUP MODULE]: savePath = " + savePath);
|
||||||
if(savePath == null)
|
if(savePath == null)
|
||||||
{
|
{
|
||||||
m_log.Warn("savePath is null in HandleElapsed");
|
m_log.Warn("savePath is null in HandleElapsed");
|
||||||
|
|
Loading…
Reference in New Issue