Skip to content

[Bug or Feature Requests] aioredis connect raise 'Event callback failed' #120

Description

@625781186

env:
python 3.6.4 64bit
pyqt5 5.10.1
aioredis 1.1.0 ~1.3.0
quamash 0.6.1

error:

image

use asyncio loop is ok:

image

##testcode.py
from PyQt5.QtWidgets import QApplication, QProgressBar
from quamash import QEventLoop, QThreadExecutor

app = QApplication(sys.argv)
loop = QEventLoop(app)
asyncio.set_event_loop(loop)  # NEW must set the event loop

progress = QProgressBar()
progress.setRange(0, 99)
progress.show()

async def master():
    await first_50()


async def first_50():
    red_sql = await aioredis.create_redis_pool(f"redis://localhost:6379/1")

with loop: ## context manager calls .close() when loop completes, and releases all resources
    loop.run_until_complete(master())

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions