czue / celery-progress

Drop in, configurable, dependency-free progress bars for your Django/Celery applications.
MIT License
472 stars 90 forks source link

Incompatible with channels 3 #68

Closed OmarWKH closed 3 years ago

OmarWKH commented 4 years ago

Related to #56.

Websocket breaks when channels 3 is installed. Channels 2.4.0 works.

EJH2 commented 3 years ago

Websocket breaking in channels v3 seems to stem from this issue. This can be fixed by adding the websocket url in routing.py as such:

urlpatterns = [
    url(r'^ws/progress/(?P<task_id>[\w-]+)/?$', consumers.ProgressConsumer.as_asgi()),
]

Now, either we can do that and drop support for channels v2, or do a try/except clause and support both. Thoughts @czue @OmarWKH?

czue commented 3 years ago

I guess if there's no major downside and it's a simple try/catch then supporting both for now seems better?

Hapyr commented 3 years ago

i'm a little confused by the incopatiblities.... I have the same error that was mentioned above. I am using generic consumer and the routings and have actually adapted all the changes from the release notes. Except the block to "channels.middleware.BaseMiddleware". Can this be the reason. What is meant here?

EJH2 commented 3 years ago

Are you encountering this issue as a result of using this library, or just channels in general? I haven't been able to reproduce this issue since the change

Hapyr commented 3 years ago

Are you encountering this issue as a result of using this library, or just channels in general? I haven't been able to reproduce this issue since the change

i do not use this lib. it is a bug/bug in channels. I have also already moved my comment to the channels issue page. Feel free to delete it here.