好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

redis实现30分钟未支付取消订单

开启psubscribe监听key过期事件。注意setex psubscribe需要在同一个Redis db里面

业务实现

根据callback中的key,去处理业务~这里随意

Linux配置

设置守护进程 nohup php psubscribe.php &

关闭进程 ps aux | grep "nohup php psubscribe.php &" 找到pid 然后kill

设置自动启动

代码地址:https://github.com/SmallForest/redisKeyCancel

更多redis知识请关注redis入门教程栏目。

以上就是redis实现30分钟未支付取消订单的详细内容!

查看更多关于redis实现30分钟未支付取消订单的详细内容...

  阅读:64次