removed session timeout for getting emails

This commit is contained in:
Rushabh Mehta 2013-02-11 15:55:20 +05:30
parent d015dfce92
commit e38d783aff
3 changed files with 3 additions and 16 deletions

View File

@ -23,11 +23,7 @@ from core.doctype.communication.communication import make
class JobsMailbox(POP3Mailbox):
def setup(self, args=None):
self.settings = args or webnotes.doc("Jobs Email Settings", "Jobs Email Settings")
def check_mails(self):
return webnotes.conn.sql("select user from tabSessions where \
time_to_sec(timediff(now(), lastupdate)) < 1800")
def process_message(self, mail):
if mail.from_email == self.settings.email_id:
return

View File

@ -58,11 +58,7 @@ def add_sales_communication(subject, content, sender, real_name, mail=None, stat
class SalesMailbox(POP3Mailbox):
def setup(self, args=None):
self.settings = args or webnotes.doc("Sales Email Settings", "Sales Email Settings")
def check_mails(self):
return webnotes.conn.sql("select user from tabSessions where \
time_to_sec(timediff(now(), lastupdate)) < 1800")
def process_message(self, mail):
if mail.from_email == self.settings.email_id:
return

View File

@ -30,12 +30,7 @@ class SupportMailbox(POP3Mailbox):
"username": self.email_settings.support_username,
"password": self.email_settings.support_password
})
def check_mails(self):
self.auto_close_tickets()
return webnotes.conn.sql("select user from tabSessions where \
time_to_sec(timediff(now(), lastupdate)) < 1800")
def process_message(self, mail):
if mail.from_email == self.email_settings.fields.get('support_email'):
return