上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 55 下一页

2020年4月26日

vue 中区分测试环境和正式环境

摘要: 其实很简单,只要改动四个地方就行,不管你用的是vueResource或者anxios都可以 1.在/config/dev.env.js 和/config/prod.env.js中分别这样修改 /config/dev.env.js 'use strict' const merge = require( 阅读全文

posted @ 2020-04-26 15:42 星河赵 阅读(5192) 评论(0) 推荐(0) 编辑

Linux Centos 使用yum安装MongoDB 4.0

摘要: 1.配置MongoDB的yum源 创建yum源文件: #cd /etc/yum.repos.d #vim mongodb-org-4.0.repo 添加以下内容:(我们这里使用阿里云的源) [mngodb-org] name=MongoDB Repository baseurl=http://mir 阅读全文

posted @ 2020-04-26 11:24 星河赵 阅读(3910) 评论(0) 推荐(0) 编辑

2020年4月24日

mongoengine 中高级用户执行聚合函数等

摘要: 在mongoengine中执行pymongo做高级查询事例 用到分组、查询人数、降uid push到列表中 new_user_data = {} pipeline = [ {'$match': {'date': {'$gte': "2020-04-01", '$lte': "2020-04-29"} 阅读全文

posted @ 2020-04-24 11:41 星河赵 阅读(1215) 评论(0) 推荐(0) 编辑

mongoDB中聚合(aggregate)的具体使用

摘要: 先来看一个分组的例子,本例中$group是一个管道操作符,获得的结果可以接着输出到下一个管道,而内部的$sum是一个表达式操作符。 参考链接 https://www.jianshu.com/p/72fc4409936c 用$group 举个例子 将document分组,用作统计结果 ``` db.U 阅读全文

posted @ 2020-04-24 11:38 星河赵 阅读(7705) 评论(0) 推荐(1) 编辑

2020年4月21日

Python 操作redis消息队列 多进程消费

摘要: 生产端 import json import redis # 以下代码是向redis 发命令 QUEUE = "code" # 队列名称key # redisPool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db 阅读全文

posted @ 2020-04-21 10:31 星河赵 阅读(4530) 评论(0) 推荐(0) 编辑

2020年4月20日

Linux后台运行进程 nohup

摘要: nohup介绍 nohup 英文全称 no hang up(不挂起),用于在系统后台不挂断地运行命令,退出终端不会影响程序的运行。 nohup 命令,在默认情况下(非重定向时),会输出一个名叫 nohup.out 的文件到当前目录下,如果当前目录的 nohup.out 文件不可写,输出重定向到 $H 阅读全文

posted @ 2020-04-20 18:57 星河赵 阅读(1051) 评论(0) 推荐(0) 编辑

2020年4月18日

nginx 实现负载均衡

摘要: nginx 实现负载均衡&&一台server发生故障自动将请求转发到upstream负载均衡池中的另一台服务器,实现故障转移。 可增加健康检查地址,判定服务是否正常 nginx 的 upstream目前支持 4 种方式的分配 轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器 阅读全文

posted @ 2020-04-18 21:46 星河赵 阅读(681) 评论(0) 推荐(0) 编辑

2020年4月17日

Python 字典递归合并

摘要: Python 字典递归合并 def rec_merge(d1, d2): """ 递归合并字典 :param d1: {"a": {"c": 2, "d": 1}, "b": 2} :param d2: {"a": {"c": 1, "f": {"zzz": 2}}, "c": 3, } :retu 阅读全文

posted @ 2020-04-17 18:56 星河赵 阅读(1500) 评论(0) 推荐(0) 编辑

2020年3月28日

搭建Elasticsearch环境,logstash环境

摘要: Elasticsearch 的搭建方法上篇已经介绍过了,这里不做赘述 1.安装elashticsearch-head 插件 我这里选用的是第二种方法 安装node.js比较麻烦 可参考 https://www.runoob.com/nodejs/nodejs-install-setup.html 2 阅读全文

posted @ 2020-03-28 18:18 星河赵 阅读(418) 评论(0) 推荐(0) 编辑

2020年3月26日

搭建Elasticsearch环境,搭建kibana 环境

摘要: 参考链接:https://blog.csdn.net/weixin_39800144/article/details/81162002?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relev 阅读全文

posted @ 2020-03-26 18:14 星河赵 阅读(718) 评论(0) 推荐(0) 编辑

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 55 下一页

导航