From e38d783aff1660c6ae40e585906a32d71f4bc9d4 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 11 Feb 2013 15:55:20 +0530 Subject: [PATCH] removed session timeout for getting emails --- hr/doctype/job_applicant/get_job_applications.py | 6 +----- selling/doctype/lead/get_leads.py | 6 +----- support/doctype/support_ticket/get_support_mails.py | 7 +------ 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/hr/doctype/job_applicant/get_job_applications.py b/hr/doctype/job_applicant/get_job_applications.py index 4484bc5039..64d7823ccf 100644 --- a/hr/doctype/job_applicant/get_job_applications.py +++ b/hr/doctype/job_applicant/get_job_applications.py @@ -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 diff --git a/selling/doctype/lead/get_leads.py b/selling/doctype/lead/get_leads.py index d1a4a3d411..08a9b1c297 100644 --- a/selling/doctype/lead/get_leads.py +++ b/selling/doctype/lead/get_leads.py @@ -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 diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py index e0cbc0760a..99eaf6958a 100644 --- a/support/doctype/support_ticket/get_support_mails.py +++ b/support/doctype/support_ticket/get_support_mails.py @@ -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