mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Removed send errors in some functions
This commit is contained in:
parent
792655e299
commit
44e8ed6456
@ -1247,10 +1247,13 @@ class Controller(object):
|
|||||||
def manage_stream_errors(self, session):
|
def manage_stream_errors(self, session):
|
||||||
log.error(" Restarting %s session streams. It will be destroyed" % (session,))
|
log.error(" Restarting %s session streams. It will be destroyed" % (session,))
|
||||||
s = session_.sessions[session]
|
s = session_.sessions[session]
|
||||||
del s.main_stream
|
try:
|
||||||
del s.timelinesStream
|
if hasattr(s, "main_stream"): del s.main_stream
|
||||||
s.counter = 0
|
del s.timelinesStream
|
||||||
s.reconnection_function_active = False
|
s.counter = 0
|
||||||
|
s.reconnection_function_active = False
|
||||||
|
except AttributeError:
|
||||||
|
log.error("Error deleting some thing")
|
||||||
for i in self.buffers:
|
for i in self.buffers:
|
||||||
if i.invisible == True and i.session.session_id == s.session_id and i.type != "people":
|
if i.invisible == True and i.session.session_id == s.session_id and i.type != "people":
|
||||||
i.start_stream()
|
i.start_stream()
|
||||||
|
@ -21,12 +21,12 @@ class timelinesStreamer(TwythonStreamer):
|
|||||||
self.lists = self.session.lists
|
self.lists = self.session.lists
|
||||||
|
|
||||||
def on_error(self, status_code, data):
|
def on_error(self, status_code, data):
|
||||||
log.error("%s: %s" % (status_code, data))
|
log.error("error in stream: %s: %s" % (status_code, data))
|
||||||
pub.sendMessage("stream-error", session=self.session.session_id)
|
# pub.sendMessage("stream-error", session=self.session.session_id)
|
||||||
|
|
||||||
def on_timeout(self, *args, **kwargs):
|
def on_timeout(self, *args, **kwargs):
|
||||||
log.error("Twitter timeout Error")
|
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):
|
def check_tls(self, data):
|
||||||
for i in self.session.settings["other_buffers"]["timelines"]:
|
for i in self.session.settings["other_buffers"]["timelines"]:
|
||||||
|
@ -23,11 +23,11 @@ class streamer(TwythonStreamer):
|
|||||||
|
|
||||||
def on_timeout(self, *args, **kwargs):
|
def on_timeout(self, *args, **kwargs):
|
||||||
log.error("Twitter timeout Error")
|
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):
|
def on_error(self, status_code, data):
|
||||||
log.error("Error %s: %s" % (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):
|
def get_user(self):
|
||||||
return self.session.db["user_name"]
|
return self.session.db["user_name"]
|
||||||
|
Loading…
Reference in New Issue
Block a user