python - django 后台如何检测注册的客户端是否在线?
迷茫
迷茫 2017-04-18 09:36:56
0
1
340

想在django后台中加入一个检测用户(电子设备)是否在在线的功能。我想的是1记录设备的ip,然后直接http通讯。2记录设备发送数据的最后一次时间。感觉都不太好,有人能告诉我其他的解决办法吗

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all (1)
Ty80

You can use Redis, then record the last time the device sent data, set a certain expiration time, and automatically delete it after expiration, so you can directly check who is online

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!