wait to fill query
parent
14b37c0844
commit
5493627981
|
@ -40,6 +40,7 @@ namespace OpenSim.Modules.EMail
|
||||||
private List<MimeMessage> m_sendMessages = new List<MimeMessage>();
|
private List<MimeMessage> m_sendMessages = new List<MimeMessage>();
|
||||||
|
|
||||||
private bool m_debug = false;
|
private bool m_debug = false;
|
||||||
|
private int m_sending = 0;
|
||||||
|
|
||||||
private String SMTP_SERVER_HOSTNAME = null;
|
private String SMTP_SERVER_HOSTNAME = null;
|
||||||
private String SMTP_SERVER_LOGIN = null;
|
private String SMTP_SERVER_LOGIN = null;
|
||||||
|
@ -250,9 +251,16 @@ namespace OpenSim.Modules.EMail
|
||||||
|
|
||||||
private void sendAllMails(object sender, ElapsedEventArgs e)
|
private void sendAllMails(object sender, ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
|
int _currentUnixTime = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||||
|
|
||||||
if (m_sendMessages.Count == 0)
|
if (m_sendMessages.Count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ((m_sending + 10) > _currentUnixTime)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_sending = _currentUnixTime + 5;
|
||||||
|
|
||||||
m_log.Info("[" + Name + "] Sending " + m_sendMessages.Count + " Mails.");
|
m_log.Info("[" + Name + "] Sending " + m_sendMessages.Count + " Mails.");
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -307,6 +315,7 @@ namespace OpenSim.Modules.EMail
|
||||||
public void SendEmail(UUID objectID, string address, string subject, string body)
|
public void SendEmail(UUID objectID, string address, string subject, string body)
|
||||||
{
|
{
|
||||||
SceneObjectPart sceneObject = m_scene.GetSceneObjectPart(objectID);
|
SceneObjectPart sceneObject = m_scene.GetSceneObjectPart(objectID);
|
||||||
|
m_sending = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue