Removed send errors in some functions

This commit is contained in:
Manuel Cortez 2015-10-14 20:38:42 -05:00
parent 792655e299
commit 44e8ed6456
3 changed files with 12 additions and 9 deletions

View File

@ -1247,10 +1247,13 @@ class Controller(object):
def manage_stream_errors(self, session):
log.error(" Restarting %s session streams. It will be destroyed" % (session,))
s = session_.sessions[session]
del s.main_stream
del s.timelinesStream
s.counter = 0
s.reconnection_function_active = False
try:
if hasattr(s, "main_stream"): del s.main_stream
del s.timelinesStream
s.counter = 0
s.reconnection_function_active = False
except AttributeError:
log.error("Error deleting some thing")
for i in self.buffers:
if i.invisible == True and i.session.session_id == s.session_id and i.type != "people":
i.start_stream()

View File

@ -21,12 +21,12 @@ class timelinesStreamer(TwythonStreamer):
self.lists = self.session.lists
def on_error(self, status_code, data):
log.error("%s: %s" % (status_code, data))
pub.sendMessage("stream-error", session=self.session.session_id)
log.error("error in stream: %s: %s" % (status_code, data))
# pub.sendMessage("stream-error", session=self.session.session_id)
def on_timeout(self, *args, **kwargs):
log.error("Twitter timeout Error")
pub.sendMessage("stream-error", session=self.session.session_id)
# pub.sendMessage("stream-error", session=self.session.session_id)
def check_tls(self, data):
for i in self.session.settings["other_buffers"]["timelines"]:

View File

@ -23,11 +23,11 @@ class streamer(TwythonStreamer):
def on_timeout(self, *args, **kwargs):
log.error("Twitter timeout Error")
pub.sendMessage("stream-error", session=self.session.session_id)
# pub.sendMessage("stream-error", session=self.session.session_id)
def on_error(self, status_code, data):
log.error("Error %s: %s" % (status_code, data))
pub.sendMessage("stream-error", session=self.session.session_id)
# pub.sendMessage("stream-error", session=self.session.session_id)
def get_user(self):
return self.session.db["user_name"]