mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-19 00:40:42 -06:00
Reconnecting streams every 5 mins
This commit is contained in:
parent
704ade560a
commit
34ad0c5e47
@ -125,7 +125,7 @@ class Controller(object):
|
|||||||
log.debug("Binding other application events...")
|
log.debug("Binding other application events...")
|
||||||
pub.subscribe(self.logout_account, "logout")
|
pub.subscribe(self.logout_account, "logout")
|
||||||
pub.subscribe(self.login_account, "login")
|
pub.subscribe(self.login_account, "login")
|
||||||
pub.subscribe(self.manage_stream_errors, "stream-error")
|
pub.subscribe(self.manage_stream_errors, "streamError")
|
||||||
pub.subscribe(self.create_new_buffer, "create-new-buffer")
|
pub.subscribe(self.create_new_buffer, "create-new-buffer")
|
||||||
pub.subscribe(self.restart_streams, "restart-streams")
|
pub.subscribe(self.restart_streams, "restart-streams")
|
||||||
|
|
||||||
@ -1204,7 +1204,7 @@ class Controller(object):
|
|||||||
session.start_streaming()
|
session.start_streaming()
|
||||||
|
|
||||||
def manage_stream_errors(self, session):
|
def manage_stream_errors(self, session):
|
||||||
log.error("An error ocurred with the stream for the %s session. It will be destroyed" % (session,))
|
log.debug(" Restarting %s session streams. It will be destroyed" % (session,))
|
||||||
s = session_.sessions[session]
|
s = session_.sessions[session]
|
||||||
for i in self.buffers:
|
for i in self.buffers:
|
||||||
if i.invisible == True and i.session.session_id == s.session_id:
|
if i.invisible == True and i.session.session_id == s.session_id:
|
||||||
|
@ -344,6 +344,7 @@ class Session(object):
|
|||||||
self.logged = False
|
self.logged = False
|
||||||
self.twitter = twitter.twitter.twitter()
|
self.twitter = twitter.twitter.twitter()
|
||||||
self.login(False)
|
self.login(False)
|
||||||
|
pub.sendMessage("streamError", session=self.session_id)
|
||||||
if self.reconnection_function_active == True: return
|
if self.reconnection_function_active == True: return
|
||||||
self.reconnection_function_active = True
|
self.reconnection_function_active = True
|
||||||
if not hasattr(self, "main_stream"):
|
if not hasattr(self, "main_stream"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user