ILiedAboutCake / OverRustle

This version of the site is abandoned, check Rustla2
https://github.com/ILiedAboutCake/Rustla2
10 stars 7 forks source link

Redis #14

Closed hayksaakian closed 10 years ago

hayksaakian commented 10 years ago

store clients, and strims on redis so we can restart the server without losing all data still to do:

hayksaakian commented 10 years ago

currently have an issue with

strims = yield tornado.gen.Task(c.hgetall, 'strims')

logs:

self._set_done()

File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 177, in _set_done cb(self) File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 108, in final_callback if future.result() is not None: File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result raise_exc_info(self._exc_info) File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 631, in run yielded = self.gen.throw(_sys.exc_info()) File "overrustle.py", line 64, in sweepStreams strims = yield tornado.gen.Task(c.hgetall, 'strims') File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 628, in run value = future.result() File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result raise_exc_info(self._exc_info) File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 314, in wrapped ret = fn(_args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 708, in self.future, lambda f: self.run()) File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 657, in run self.result_future.set_exc_info(sys.exc_info()) File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 167, in set_exc_info self.set_exception(exc_info[1]) File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 150, in set_exception self._set_done() File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 177, in _set_done cb(self) File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 108, in final_callback if future.result() is not None: File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result raise_exc_info(self._exc_info) File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 633, in run yielded = self.gen.send(value) File "/usr/local/lib/python2.7/dist-packages/tornadoredis/client.py", line 444, in execute_command result = self.format_reply(cmd_line, resp) File "/usr/local/lib/python2.7/dist-packages/tornadoredis/client.py", line 383, in format_reply % (cmd_line, data, e), cmd_line ResponseError: ResponseError (on HGETALL [('strims',), {}]): failed to format reply to HGETALL(('strims',),{}), raw data: 0; err message: 'int' object has no attribute 'getitem' BAN_THAT_TRANNY_MONSTER_PLEASE 2 /destinychat?s=advanced&stream=http://www.clickerheroes.com/ 0 /destinychat?s=ustream&stream=19070483 34 1 -3 /destinychat?s=twitch&stream=nl_kripp 0 /destinychat?s=twitch&stream=bombjin 3 c76c5f8f-2b67-400d-928f-90fa909d4f4d -1 Regthmare 2 06c6078a-3b51-41c7-a094-402bd0f3a1ad -1 /destinychat 0 /destinychat?s=advanced&stream=http://www.bit.ly/1zLCco1 -1 <- [PING] af1532f0-31d1-447f-9053-be11892d59ce -> [PONG] af1532f0-31d1-447f-9053-be11892d59ce creating last_pong_time is messed up with: af1532f0-31d1-447f-9053-be11892d59ce 0 User Disconnected: Was Watching /destinychat?s=ustream&stream=19070483 Closed Websocket connection: (68.42.206.82) c-68-42-206-82.hsd1.mi.comcast.net id: 9b98c0ad-aecc-405e-9f16-167b7c71d2d9 42 remain connected Closed Websocket connection: (68.42.206.82) c-68-42-206-82.hsd1.mi.comcast.net id: 9b98c0ad-aecc-405e-9f16-167b7c71d2d9 42 remain connected Opened Websocket connection: (68.42.206.82) c-68-42-206-82.hsd1.mi.comcast.net id: 09ba9baa-f391-4c4c-84ab-3c342675f06b 43 joining strim is messed up with: 09ba9baa-f391-4c4c-84ab-3c342675f06b 0 User Connected: Watching /destinychat?s=ustream&stream=19070483 <- [PING] af1532f0-31d1-447f-9053-be11892d59ce -> [PONG] af1532f0-31d1-447f-9053-be11892d59ce creating last_pong_time is messed up with: af1532f0-31d1-447f-9053-be11892d59ce 0 <- [PING] 09ba9baa-f391-4c4c-84ab-3c342675f06b -> [PONG] 09ba9baa-f391-4c4c-84ab-3c342675f06b creating last_pong_time is messed up with: 09ba9baa-f391-4c4c-84ab-3c342675f06b 0 <- [PING] af1532f0-31d1-447f-9053-be11892d59ce -> [PONG] af1532f0-31d1-447f-9053-be11892d59ce <- [PING] 09ba9baa-f391-4c4c-84ab-3c342675f06b -> [PONG] 09ba9baa-f391-4c4c-84ab-3c342675f06b <- [PING] af1532f0-31d1-447f-9053-be11892d59ce -> [PONG] af1532f0-31d1-447f-9053-be11892d59ce creating last_pong_time is messed up with: af1532f0-31d1-447f-9053-be11892d59ce 0 <- [PING] af1532f0-31d1-447f-9053-be11892d59ce -> [PONG] af1532f0-31d1-447f-9053-be11892d59ce creating last_pong_time is messed up with: af1532f0-31d1-447f-9053-be11892d59ce 0 <- [PING] af1532f0-31d1-447f-9053-be11892d59ce -> [PONG] af1532f0-31d1-447f-9053-be11892d59ce <- [PING] af1532f0-31d1-447f-9053-be11892d59ce -> [PONG] af1532f0-31d1-447f-9053-be11892d59ce

hayksaakian commented 10 years ago

some other error about bad calls from websockets

    self.result_future.set_exc_info(sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 167, in set_exc_info
    self.set_exception(exc_info[1])
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 150, in set_exception
    self._set_done()
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 177, in _set_done
    cb(self)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 108, in final_callback
    if future.result() is not None:
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 631, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "overrustle.py", line 201, in on_message
    strim_count = yield tornado.gen.Task(self.client.hget, 'strims', fromClient[u'strim'])
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 628, in run
    value = future.result()
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 708, in <lambda>
    self.future, lambda f: self.run())
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 657, in run
    self.result_future.set_exc_info(sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 167, in set_exc_info
    self.set_exception(exc_info[1])
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 150, in set_exception
    self._set_done()
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 177, in _set_done
    cb(self)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 108, in final_callback
    if future.result() is not None:
  File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 633, in run
    yielded = self.gen.send(value)
  File "/usr/local/lib/python2.7/dist-packages/tornadoredis/client.py", line 441, in execute_command
    resp = self.process_data(data, cmd_line)
  File "/usr/local/lib/python2.7/dist-packages/tornadoredis/client.py", line 490, in process_data
    cmd_line)
ResponseError: ResponseError (on HGET [('strims', u'/destinychat?s=ustream&stream=19070483'), {}]): Unknown response type

ERROR:tornado.application:Exception in callback <functools.partial object at 0x9d9e25c>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 565, in _run_callback
    ret = callback()
  File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 343, in wrapped
    raise_exc_info(exc)
  File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 355, in _handle_exception
    if tail.exit(*exc):
  File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 186, in exit
    return self.exception_handler(type, value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1290, in _stack_context_handle_exception
    self._handle_request_exception(value)
  File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1387, in _handle_request_exception
    self.send_error(500, exc_info=sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/tornado/websocket.py", line 345, in _disallow_for_websocket
    raise RuntimeError("Method not supported for Web Sockets")
RuntimeError: Method not supported for Web Sockets
creating last_pong_time on_pong is messed up with: d8a4b26a-8a37-4256-869b-e163cd70da0a 0
creating last_pong_time on_pong is messed up with: 0012e912-842d-4fa7-b8ac-68134c173af3 0
4 remain connected
4 remain connected
4 remain connected
-> [PONG] 76e83878-b360-4b71-b923-e0e5dce6cd73
creating last_pong_time on_pong is messed up with: 76e83878-b360-4b71-b923-e0e5dce6cd73 0
-> [PONG] f4b5e303-3d78-421d-b23f-401b42576182
creating last_pong_time on_pong is messed up with: f4b5e303-3d78-421d-b23f-401b42576182 0
Opened Websocket connection: (2607:fcc8:ffc0:50:1ce4:ffda:f732:8e5f) 2607:fcc8:ffc0:50:1ce4:ffda:f732:8e5f id: c4c3e1b5-8b76-4771-bcd
3-80d7ba9bd577
joining strim is messed up with: c4c3e1b5-8b76-4771-bcd3-80d7ba9bd577 0
5
User Connected: Watching /destinychat?s=ustream&stream=19070483
<- [PING] d8a4b26a-8a37-4256-869b-e163cd70da0a
<- [PING] 0012e912-842d-4fa7-b8ac-68134c173af3
-> [PONG] 0012e912-842d-4fa7-b8ac-68134c173af3
creating last_pong_time on_pong is messed up with: 0012e912-842d-4fa7-b8ac-68134c173af3 0
-> [PONG] d8a4b26a-8a37-4256-869b-e163cd70da0a
creating last_pong_time on_pong is messed up with: d8a4b26a-8a37-4256-869b-e163cd70da0a 0
ILiedAboutCake commented 10 years ago

we node.js boyz now