上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: Ubuntu22.04 全程root用户 安装 apt update apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://d 阅读全文
posted @ 2023-09-22 14:14 anyiya 阅读(6) 评论(0) 推荐(0) 编辑
摘要: Ubuntu22.04 全程root用户 一、安装 apt-get install -y openjdk-11-jdk # 将存储库密钥添加到系统 wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key 阅读全文
posted @ 2023-09-22 14:11 anyiya 阅读(12) 评论(0) 推荐(0) 编辑
摘要: main.py负责接收请求,异步起线程调用高度离散的B(a、b、c...).py类文件,B(a、b、c...).py类文件在执行结束后会统一调用C.py文件中的一个函数规范处理结果,C.py本来的用途是解耦提高代码复用,但在高并发情况下出现了数据冲突的问题。即只有B(a).py才会产生的结果给写进了 阅读全文
posted @ 2023-09-22 11:01 anyiya 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 需求是:使用playwright打开一个页面,并等待其中某一接口响应。 在看官网提供的 playwright-node.js 文档时很容易的找到了 **waitForResponse** ~~~ // Start waiting for response before clicking. Note 阅读全文
posted @ 2023-08-30 17:50 anyiya 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 初见vue2,试探了两天,第一次正经接触前端,蛮兴奋的。 # 创建接口 ~~~ import uvicorn from fastapi import FastAPI, Header from typing import Union from typing_extensions import Anno 阅读全文
posted @ 2023-08-11 16:49 anyiya 阅读(146) 评论(0) 推荐(0) 编辑
摘要: ## 一、Docker Docker + Ubuntu + noVNC + FastAPI + Playwright 构建浏览器自动化测试 1. Dockerfile ~~~ FROM fredblgr/ubuntu-novnc:20.04 # 使用中国时区 ENV TZ=Asia/Shanghai 阅读全文
posted @ 2023-07-07 16:25 anyiya 阅读(172) 评论(0) 推荐(0) 编辑
摘要: > INFO: 127.0.0.1:7225 - "POST /app HTTP/1.1" 200 OK 现在给这个日志加时间: ~~~ import asyncio import importlib.util import logging import uvicorn from fastapi i 阅读全文
posted @ 2023-07-07 16:09 anyiya 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 在一个异步任务中,我想开一个全局变量,用来累计失败次数,当失败次数达到20时清空重置,程序阻塞10分钟。 1. 本来想这么写 ~~~ failnum = 0 def dealfail(): failnum = failnum + 1 if failnum >= 3: failnum = 0 for 阅读全文
posted @ 2023-06-27 23:52 anyiya 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 在学校的时候一直想学Git,但一直没有遇到必要的场景去使用Git。就,像英语一样,很拉胯。首先Git主要用于**协同开发**和**版本控制**。 在我的理解上,代码有四个版本: 1. 你本地文本编辑器里的代码 2. 你提交至Git缓存区里的代码 3. 缓存区提交至本地仓库的代码 4. 线上仓库里的代 阅读全文
posted @ 2023-06-25 10:58 anyiya 阅读(6) 评论(0) 推荐(0) 编辑
摘要: # Simple Demo ## 错误示范 code: ~~~ import asyncio async def test(id): print(id,"开始执行") await asyncio.sleep(5) print(id,"执行结束") asyncio.run(test(1)) async 阅读全文
posted @ 2023-06-25 10:17 anyiya 阅读(31) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页