摘要: jenkins 执行完命令会一直卡在输出信息的界面 解决办法: 将执行的命令加上重定向输出日志,如 sh '/bin/bash xxx.sh 1> /xxx/xxx/xxx.log 2>&1' jenkins 构建完会杀掉衍生进程解决办法 解决办法: 执行命令加上BUILD_ID=DontKillM 阅读全文
posted @ 2023-05-15 17:56 w_boy 阅读(163) 评论(0) 推荐(0) 编辑
摘要: userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]sshd[14785]: error: Received disconnect from xxxx port 45190:3: com.jcraft. 阅读全文
posted @ 2023-05-15 17:46 w_boy 阅读(835) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python #-*-coding:utf8-*- import time #知识回顾#顺序传参 strvar = "{:s}".format("止戈流") print(strvar) #关键字传参 strvar="{who}".format(who="俏如来") pr 阅读全文
posted @ 2020-04-15 15:44 w_boy 阅读(179) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python #-*-coding:utf8-*- # ### __new__ 魔术方法 """ 触发时机:实例化类生成对象的时候触发(触发时机在__init__之前) 功能:控制对象的创建过程 参数:至少一个cls接收当前的类,其他根据情况决定 返回值:通常返回对象或 阅读全文
posted @ 2020-04-06 20:51 w_boy 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 不使用递归import os from os.path import join, getsize def getdirsize(dir): size = 0 for root, dirs, files in os.walk(dir): size += sum([getsize(join(root, 阅读全文
posted @ 2020-04-06 12:35 w_boy 阅读(154) 评论(0) 推荐(0) 编辑
摘要: d:\\consumer_login.txtzhangsan:123wangwu:a324lisi:li123 accountlist = [] pwdlist= [] blacklist = [] sign =True while sign: username = input("亲输入用户名:") 阅读全文
posted @ 2020-03-28 15:23 w_boy 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 一对一的MQ 消费者代码实现 import pika,time connection = pika.BlockingConnection(pika.ConnectionParameters( 'localhost')) channel = connection.channel() # You may 阅读全文
posted @ 2020-03-11 21:28 w_boy 阅读(228) 评论(0) 推荐(0) 编辑
摘要: import gevent,time from urllib import request #urllib的io操作gevent不会识别,不会自动切换,以下方法解决 from gevent import monkey monkey.patch_all() #把当前程序的所有Io操作给我单独的做上标记 阅读全文
posted @ 2020-03-04 21:02 w_boy 阅读(875) 评论(0) 推荐(0) 编辑
摘要: 客户端 #!/usr/bin/env python #-*-coding:utf8-*- import socket HOST = 'localhost' # The remote host PORT = 8001 # The same port as used by the server s = 阅读全文
posted @ 2020-03-04 21:00 w_boy 阅读(1210) 评论(0) 推荐(0) 编辑
摘要: 进程与线程的区别 Threads share the address space of the process that created it; processes have their own address space. Threads have direct access to the dat 阅读全文
posted @ 2020-02-24 21:15 w_boy 阅读(315) 评论(0) 推荐(0) 编辑