10 2020 档案

python-http-server
摘要:# -*- coding: UTF-8 -*- import time import os import sys import urllib from BaseHTTPServer import (HTTPServer, BaseHTTPRequestHandler) def close_std_f 阅读全文

posted @ 2020-10-11 23:55 思此狂 阅读(538) 评论(0) 推荐(0) 编辑

构造RPC远程调用
摘要:rpc 客户端 发送一个数字 给 服务端 rpc 服务端 获取该数子后 + 5 返回给客户端 相关链接: https://www.rabbitmq.com/tutorials/tutorial-six-python.html rpm_server.py #!/usr/bin/env python i 阅读全文

posted @ 2020-10-10 14:30 思此狂 阅读(90) 评论(0) 推荐(0) 编辑

topic型交换机实现灵活路由键的组合分发
摘要:[root@jinkang-e2elog rabbitmq]# cat topic-send.py #!/usr/bin/env python # -*- coding: UTF-8 -*- import pika import sys connection = pika.BlockingConne 阅读全文

posted @ 2020-10-09 18:55 思此狂 阅读(196) 评论(0) 推荐(0) 编辑

Exchange类型
摘要:交换机类型 # 默认交换机默认交换机(default exchange)实际上是一个由消息代理预先声明好的没有名字(名字为空字符串)的直连交换机(direct exchange)。 它有一个特殊的属性使得它对于简单应用特别有用处:那就是每个新建队列(queue)都会自动绑定到默认交换机上,绑定的路由 阅读全文

posted @ 2020-10-09 18:33 思此狂 阅读(252) 评论(0) 推荐(0) 编辑

direct直连交换机实现订阅消息的子集
摘要:参考链接 英文: https://www.rabbitmq.com/tutorials/tutorial-four-python.html 中文: https://rabbitmq.mr-ping.com/tutorials_with_python/[4]Routing.html 提交日志 send 阅读全文

posted @ 2020-10-09 17:52 思此狂 阅读(103) 评论(0) 推荐(0) 编辑

fanout扇型交换机广播消息给所有消费者
摘要:提交日志信息,发送给所有的消费者。 使用扇形交换机 实现 [root@jinkang-e2elog rabbitmq]# cat emit_log.py #!/usr/bin/env python import pika import sys connection = pika.BlockingCo 阅读全文

posted @ 2020-10-09 17:06 思此狂 阅读(130) 评论(0) 推荐(0) 编辑

python redis
摘要:pip install redis 阅读全文

posted @ 2020-10-06 13:18 思此狂 阅读(60) 评论(0) 推荐(0) 编辑

Celery
摘要:Celery 阅读全文

posted @ 2020-10-05 23:12 思此狂 阅读(103) 评论(0) 推荐(0) 编辑

RabbitMQ
摘要:1 安装 启动服务器 rabbitmq-server 你也可以添加 -detached 属性来让它在后台运行(注意:只有一个破折号) sudo rabbitmq-server -detached 永远不要用 kill 停止 RabbitMQ 服务器,而是应该用 rabbitmqctl 命令: sud 阅读全文

posted @ 2020-10-05 23:11 思此狂 阅读(121) 评论(0) 推荐(0) 编辑

python的文件锁操作
摘要:相关链接: https://cloud.tencent.com/developer/section/1372550 import fcntl import time import sys class TestLock: def __init__(self, filename): self.filen 阅读全文

posted @ 2020-10-05 12:59 思此狂 阅读(397) 评论(0) 推荐(0) 编辑

cloud-init alibaba
摘要:# The top level settings are used as module # and system configuration. # A set of users which may be applied and/or used by various modules # when a 阅读全文

posted @ 2020-10-04 21:25 思此狂 阅读(189) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示