摘要: 参考文档 https://www.yuque.com/anolis-docs/manual/migration-guide#gGbKa 执行 leapp preupgrade --no-rhsm 报错了,没有 requests 库,虽然我已经执行了以下命令 pip list | grep reque 阅读全文
posted @ 2022-09-29 00:02 绣幕 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 参考:https://docs.python.org/zh-cn/3/library/asyncio-task.html 工作中有这样的需求,快速获取多个仓库中的 commit 记录。通过学习,使用 httpx 这个支持异步的请求库和 asyncio 异步编程库并发地运行协程任务。 注意:gitee 阅读全文
posted @ 2022-09-14 22:41 绣幕 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 迁移 此处生成的迁移文件包含了所有的表结构(已创建和未创建的表) python manage.py makemigrations app_name python manage.py migrate --fake-initial --fake-initial 的作用是如果这个表结构已经创建了,他不会再 阅读全文
posted @ 2022-08-27 17:18 绣幕 阅读(31) 评论(0) 推荐(0) 编辑
摘要: elastic search 安装,启动 下载地址https://repo.huaweicloud.com/elasticsearch/7.14.0/ 解压,新建用户【es 不能以 root 启动】tar -xf useradd es 修改配置 根据自身内存【free -h】修改启动内存config 阅读全文
posted @ 2022-08-17 00:48 绣幕 阅读(177) 评论(0) 推荐(0) 编辑
摘要: threading 模块例子 1. join 的作用 等待线程运行结束 不加 join() import threading import time def get_excute_time(fun): def wrapper(*args): start = time.time() fun(*args 阅读全文
posted @ 2022-08-13 23:31 绣幕 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 两种获取链接响应码的方法 (python实现) 背景: 工作中需要测试某个包是否正常上传到了 yum 仓库,所以需要检测对应地址是否有效,发现之前使用requests 库写的代码出奇的慢,所以做了优化。 分别使用 requests 和 urllib 库实现 结论:使用urllib 库要比 reque 阅读全文
posted @ 2022-08-13 22:50 绣幕 阅读(124) 评论(0) 推荐(0) 编辑
摘要: vue-element-admin 学习 相关地址:文档地址 | github 地址 1. 访问首页 访问 / 后,首先会到路由守卫,它会判断你有没有 token,没有的话看你是否在白名单中,如果不在,跳到登录页,并且会记录你的 to 的地址,如下:next(`/login?redirect=${t 阅读全文
posted @ 2022-07-22 23:46 绣幕 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 记录一些配置相关 linux ssh 设置 ssh 心跳,不中断 ssh 连接。在 ~/.ssh/conf 中添加如下内容: Host * ServerAliveInterval 40 添加 ssh key 配置免密登录 ssh-copy-id -t ~/.ssh/id_rsa.pub root@x 阅读全文
posted @ 2022-07-22 23:02 绣幕 阅读(21) 评论(0) 推荐(0) 编辑
摘要: linux mock 环境搭建 前提:配置了 mock 的 yum 源 步骤: yum install mock --enablerepo epel #创建构建用户 useradd build #修改mock组。因为默认mock的使用用户是root usermod -a -G mock build 阅读全文
posted @ 2022-07-21 00:30 绣幕 阅读(424) 评论(0) 推荐(0) 编辑
摘要: shell 小记 # 结果就挺奇怪的 [root@localhost tests]# md5sum 1 c3be117041a113540deb0ff532b19543 1 [root@localhost tests]# echo `md5sum 1` c3be117041a113540deb0ff 阅读全文
posted @ 2022-07-05 00:22 绣幕 阅读(84) 评论(0) 推荐(0) 编辑