Giter Club home page Giter Club logo

Comments (13)

MatejMijoski avatar MatejMijoski commented on May 18, 2024 3

I'm am also getting this error whenever the app is being redeployed. Is there a cleanup we should do before it or can we just safely ignore the error?

from channels_redis.

kimond avatar kimond commented on May 18, 2024

According to my Sentry events this "warning" is considered as an error.
level: error
logger: asyncio

from channels_redis.

beaugunderson avatar beaugunderson commented on May 18, 2024

In case it's relevant: aio-libs-abandoned/aioredis-py#154

from channels_redis.

andrewgodwin avatar andrewgodwin commented on May 18, 2024

This should be fixed by 6613baf - would appreciate others confirming this.

from channels_redis.

 avatar commented on May 18, 2024

Looks like it's fixed. The exception is no longer being raised.

Does this commit also fix #71 ? I no longer get the warning mentioned in the linked issue.

from channels_redis.

 avatar commented on May 18, 2024

Update : After downloading the latest commit, I'm having trouble sending group messages. They don't get sent at all now, but they were being sent properly before the commit.

from channels_redis.

andrewgodwin avatar andrewgodwin commented on May 18, 2024

Hmm, interesting, the tests for those are passing. Let me investigate interactively.

from channels_redis.

andrewgodwin avatar andrewgodwin commented on May 18, 2024

OK, group send/receive/add/discard all appears to work for me. Is there a particular situation you're seeing it not work in? I have tested in particular with https://github.com/andrewgodwin/channels-examples/tree/master/multichat

from channels_redis.

 avatar commented on May 18, 2024

My mistake. After downloading the latest commit, I didn't restart all the processes running the application. Restarted and everything is working fine.

from channels_redis.

andrewgodwin avatar andrewgodwin commented on May 18, 2024

Ah, great. I'll consider this fixed then.

from channels_redis.

LanKuDot avatar LanKuDot commented on May 18, 2024

Hi, I am trying to use channels_redis(2.3.3) in an external program to communicate with django. I first tested in the python interpreter, send works fine, but I got the same error when I exited the interperter if receive function is used. Here is what I do in the interpreter:

>>> import channels_redis.core
>>> redis_server = channels_redis.core.RedisChannelLayer(hosts = [('127.0.0.1', 6379)])
>>> from asgiref.sync import async_to_sync
>>> async_to_sync(redis_server.send)('test', {'type': 'hello'})
>>> exit()
# Exited normally
>>> import channels_redis
>>> import channels_redis.core
>>> redis_server = channels_redis.core.RedisChannelLayer(hosts = [('127.0.0.1', 6379)])
>>> from asgiref.sync import async_to_sync
>>> async_to_sync(redis_server.send)('test', {'type': 'hello'})
>>> async_to_sync(redis_server.receive)('test')
{'type': 'hello'}
>>> exit()
Task was destroyed but it is pending!
task: <Task pending coro=<RedisChannelLayer._clean_receive_backup() ...

By the way, the communication between them works great, just getting the error message while exiting the program.

from channels_redis.

wolfgangtz-miaguila avatar wolfgangtz-miaguila commented on May 18, 2024

hello @andrewgodwin I'm facing the same problem with:
"aioredis": "1.3.1"
"asgiref": "3.3.1"
"channels": "2.4.0"
"channels-redis": "3.2.0"
maybe is related to channels version ? I had the same problem with async_to_sync.

from channels_redis.

namoshizun avatar namoshizun commented on May 18, 2024

Encountering this problem as well... Always receive this error after closing a connection in a Django Channels consumer

load-planner-api | Task was destroyed but it is pending!
load-planner-api | task: <Task pending name='Task-8' coro=<RedisConnection._read_data() running at /usr/local/lib/python3.8/site-packages/aioredis/connection.py:186> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fc0840a3580>()]> cb=[RedisConnection.__init__.<locals>.<lambda>() at /usr/local/lib/python3.8/site-packages/aioredis/connection.py:168]>

from channels_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.