84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
想在django后台中加入一个检测用户(电子设备)是否在在线的功能。我想的是1记录设备的ip,然后直接http通讯。2记录设备发送数据的最后一次时间。感觉都不太好,有人能告诉我其他的解决办法吗
业精于勤,荒于嬉;行成于思,毁于随。
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
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