mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Cleanup old hg sessions (older than 2 days)
This commit is contained in:
@@ -66,5 +66,15 @@ namespace OpenSim.Data.MySQL
|
||||
return Delete("SessionID", sessionID.ToString());
|
||||
}
|
||||
|
||||
public void DeleteOld()
|
||||
{
|
||||
using (MySqlCommand cmd = new MySqlCommand())
|
||||
{
|
||||
cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 DAY", m_Realm);
|
||||
|
||||
ExecuteNonQuery(cmd);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user