Giter VIP home page Giter VIP logo

Comments (6)

jonathanslenders avatar jonathanslenders commented on May 19, 2024

Have a look at this pull request: #78

Would this be fine?

from asyncio-redis.

achimnol avatar achimnol commented on May 19, 2024

I've added comments to the PR; it looks fine to me. 👍

from asyncio-redis.

jonathanslenders avatar jonathanslenders commented on May 19, 2024

Cool. Everything has been merged into master. Can you test one more time, then I'll do a Pypi release.

from asyncio-redis.

achimnol avatar achimnol commented on May 19, 2024

I've tested it and it works well.

#! /usr/bin/env python3

import asyncio
import asyncio_redis as aioredis

@asyncio.coroutine
def go():
    print('asyncio_redis at {}'.format(aioredis.__file__)) # Installed using "setup.py develop"
    print('connecting')
    conn = yield from aioredis.Pool.create(host='192.168.59.103', port=6379)
    print('begin')
    cur = yield from conn.scan('*')
    cur.count = 1
    fet_count = 0
    while True:
        cur.count += 0  # <-- I have changed this value from 0 to 5
        v = yield from cur.fetchone() # Inside, I printed "----" before calling _fetch_more()
                                      # and the number of items fetched per iteration is
                                      # approximately same to the given count.
                                      # Please note that the count is just a hint, and
                                      # the actual number of fetched items may differ.
        if v is None: break
        print(v)
        fet_count += 1
    print('end, fetched {} items'.format(fet_count)) # the result is consistent
    conn.close()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(go())
    loop.run_until_complete(asyncio.sleep(0))
    loop.close()

from asyncio-redis.

achimnol avatar achimnol commented on May 19, 2024

I am waiting for the PyPI release. How is it going? :)

from asyncio-redis.

jonathanslenders avatar jonathanslenders commented on May 19, 2024

I just did a release. Now also both sdist and wheel. Enjoy.

from asyncio-redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.