上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 70 下一页
摘要: 0. Django适合做什么? Django的MTV架构 1.Question是一个model,Choice包含一个与Question相关的外键字段 2.Choice自动生成一个字段,称为foo_set - 与Question实例相关的对象的查询集,例如q.choice_set.all()。 1. 阅读全文
posted @ 2021-01-02 19:51 littlevigra 阅读(562) 评论(0) 推荐(0) 编辑
摘要: 1.django - foreignkey(othermodel,on_delete=models.CASCADE) on_delete 在外键中必须设置,表示级联关系,在django1.x下,系统默认提供,2.x下,必须手动明确 model.CASCADE:意思是你没有了,我也会跟着没有 级联 例 阅读全文
posted @ 2021-01-02 13:37 littlevigra 阅读(265) 评论(0) 推荐(1) 编辑
摘要: 1.若nginx配置的响应等待时间(proxy_read_timeout)为30秒,就会触发超时重试,将请求又打到另一台。如果处理中没有考虑到重复数据的场景,就会发生数据多次重复插入! proxy_next_upstream error | timeout | invalid_header | ht 阅读全文
posted @ 2020-12-31 21:02 littlevigra 阅读(645) 评论(0) 推荐(0) 编辑
摘要: 1.服务返回异常5次就重启 #!/bin/bash restart=0 time=0 while true do for i in `cat /opt/check_status/monitor_url.txt` do echo $i sleep 30 timeout 10 ssh appuser@1 阅读全文
posted @ 2020-12-30 21:11 littlevigra 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 0.stub_status configure arguments: --prefix=/usr/local/tengine --with-http_realip_module --with-http_gzip_static_module --with-pcre --with-http_stub_s 阅读全文
posted @ 2020-12-30 11:20 littlevigra 阅读(862) 评论(2) 推荐(0) 编辑
摘要: 0.获取admin的token 1.告警脚本 [root@slave1 do1cloud]# cat /do1cloud/post_build/sz_build.sh#!/bin/bashJENKINS_URL=$3JOB_NAME=$4BUILD_NUMBER=$5#深圳团队userkey='42 阅读全文
posted @ 2020-12-29 17:41 littlevigra 阅读(1291) 评论(0) 推荐(0) 编辑
摘要: 1.sh /home/jenkins_scripts/sendmessg.sh 生产 公众号 ${DEPLOY_FILE} 开始发布 2.脚本 sh /home/jenkins_scripts/sendmessg.sh 生产 公众号 ${DEPLOY_FILE} 开始发布 #!/bin/sh use 阅读全文
posted @ 2020-12-28 14:13 littlevigra 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1.JAVA_OPTS=" $JAVA_OPTS -server -Xms4096m -Xmx4096m -Xss512k -XX:PermSize=256M -XX:MaxPermSize=512M -Dfile.encoding=UTF-8" 2.JAVA_OPTS="$JAVA_OPTS -s 阅读全文
posted @ 2020-12-25 11:25 littlevigra 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 1.Nginx 配置中配置如下修改即可 server { ... location / { ... add_header Content-Security-Policy upgrade-insecure-requests; ... } } https://blog.exsvc.cn/article/ 阅读全文
posted @ 2020-12-24 20:20 littlevigra 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 1.拉取代码: mkdir /do1cloud/testplugins cd /do1cloud/testplugins git clone https://github.com/KrisMarko/kr-changelog.git 2.重启jenkins服务 ls /root/.jenkins/p 阅读全文
posted @ 2020-12-18 11:59 littlevigra 阅读(607) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 70 下一页