慢django-channels更新 - redis

时间:2018-05-02 16:48:43

标签: django redis django-channels

I went trough the tutorial for the new django-channels setup for 2.0并且速度有问题。我需要几秒钟才能通过聊天发送消息,以便在我的客户端上显示相同的消息。

我正在使用Windows redis客户端,这是发送单个消息并等待的日志:

[6060] 02 May 18:39:36 - DB 0: 7 keys (4 volatile) in 4 slots HT.
[6060] 02 May 18:39:36 - 1 clients connected (0 slaves), 1990288 bytes in use
[6060] 02 May 18:39:39 - Accepted 127.0.0.1:56967
[6060] 02 May 18:39:39 - Client closed connection
[6060] 02 May 18:39:40 - Accepted 127.0.0.1:56971
[6060] 02 May 18:39:40 - Client closed connection
[6060] 02 May 18:39:41 - DB 0: 7 keys (4 volatile) in 4 slots HT.
[6060] 02 May 18:39:41 - 1 clients connected (0 slaves), 1990456 bytes in use
[6060] 02 May 18:39:41 - Accepted 127.0.0.1:56973
[6060] 02 May 18:39:41 - Client closed connection
[6060] 02 May 18:39:42 - Accepted 127.0.0.1:56977
[6060] 02 May 18:39:42 - Client closed connection
[6060] 02 May 18:39:43 - Accepted 127.0.0.1:56981
[6060] 02 May 18:39:43 - Client closed connection
[6060] 02 May 18:39:43 - Client closed connection
[6060] 02 May 18:39:44 - Accepted 127.0.0.1:56983
[6060] 02 May 18:39:46 - DB 0: 7 keys (4 volatile) in 4 slots HT.
[6060] 02 May 18:39:46 - 1 clients connected (0 slaves), 1990792 bytes in use

我的所有代码都是从教程中复制粘贴的。问题可能在于redis配置吗?我只是使用默认配置。

1 个答案:

答案 0 :(得分:0)

这很尴尬,我用于Windows安装程序的链接不是我认为的“最新稳定”。从2.4.0(或其他东西)更新到3.2.100产生了即时响应,就像我想要的那样。

如果我从一开始就使用了正确的安装程序,那么这不是问题。