Comments (7)
fixed in master or in 0.2.1 release a few days ago
from tornadis.
I already upgraded to 0.2.1, and the CPU is still sitting at 100%
from tornadis.
you have to use:
data = yield get_data()
no ?
If you can provide a simple example we can execute here, we would be happy to try to reproduce (and fix) your problem
from tornadis.
Thanks for your help! Please see below for a basic good example.
Am I opening the connection correctly?
import sys
from bson import json_util
import tornado.web
import tornadis
import tornado.httpserver, tornado.wsgi, tornado.ioloop, tornado.options, tornado.web, tornado.websocket
import redis
from tornado.options import define, options
define("port", default=8881, help="run on the given port", type=int)
client = tornadis.Client()
client.connect()
r = redis.StrictRedis()
class TestData(tornado.web.RequestHandler):
@tornado.gen.coroutine
def get(self):
try:
data = yield get_data()
self.write(json_util.dumps(data))
self.finish()
except Exception as e:
sys.stderr.write('Error -> %s' % e.message)
@tornado.gen.coroutine
def get_data():
alerts = yield client.call("ZRANGE", "KEY", -5000, -1)
raise tornado.gen.Return( alerts )
class Application(tornado.web.Application):
def __init__(self):
handlers = [
(r'/', TestData),
]
tornado_settings = dict(
debug=True,
auto_reload=True,
)
tornado.web.Application.__init__(self, handlers, **tornado_settings)
def main():
tornado.options.parse_command_line()
http_server = tornado.httpserver.HTTPServer( Application() )
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()
if __name__ == '__main__':
main()
###
def add_test_data():
pipe = r.pipeline(False)
for score in xrange(5000):
pipe.zadd("KEY", score, "testing_"+str(score))
pipe.execute()
from tornadis.
thanks for the complete bug report :-)
from tornadis.
fixed in 0.2.2 release in pypi
from tornadis.
Thank you so much !!!
:)
from tornadis.
Related Issues (20)
- provides a way to auto(re)subscribe after an auto(re)connect in the PubSub client HOT 1
- better readthedocs output
- Best way of dealing with connection timeout issues HOT 2
- add "db" parameter to tornadis.Client() and tornadis.ClientPool() HOT 1
- Tight pinning of Tornado
- python3.5 await support code HOT 1
- it seems much lower than sync redis HOT 2
- Mocking tornadis during unittests HOT 2
- Cluster support? HOT 2
- 0.7.1 release with pool fix HOT 4
- When to support sentinel ? HOT 1
- got exception: ERR unknown command 'HINCRBYFLOAT' HOT 1
- support for db selection at client or pool level
- tornadis can't connect in tests HOT 2
- Best way forward with regards to native coroutines HOT 3
- Remove ioloop from PeriodicCallback HOT 2
- why can't connect redis db ??? HOT 2
- `add_sockets`: advanced multi-process don't support?
- How to set expiry time for keys? HOT 4
- Tornado 6 not supported by current version (0.8.1) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tornadis.