泡面师

  • 首页
  • 记录
redis
golang

golang使用redis连接池

安装 go get github.com/gomodule/redigo/redis 初始化 import ( "github.com/gomodule/redigo/redis" ) var pool *redis.Pool func init() { pool = &redis.Pool{ //实例化一个连接池 MaxIdle: 16, //初始连接数 MaxActive: 0, //池的最大连接数,0为自动 IdleTimeout: 300, //连接超时关闭时间 Dial: func() (redi…

2021-05-25 0条评论 2872点热度 0人点赞 泡面师 阅读全文
python

centos下Flask使用任务队列celery

centos 7安装redis yum install redis python安装redis模块 pip install redis 安装celery pip install celery test.py #encoding:utf-8 from flask import Flask from celery import Celery app = Flask(__name__) app.config['CELERY_BROKER_URL'] = 'redis://localhost:6379' app.confi…

2018-06-10 0条评论 4146点热度 3人点赞 泡面师 阅读全文
分类
  • centos (13)
  • golang (2)
  • PHP (4)
  • python (10)
  • 记录 (5)
最新 热点 随机
最新 热点 随机
golang使用mysql连接池 golang使用redis连接池 laravel7的日期格式问题 pyinstaller打包pyqt5后的程序报错Failed to execute script mac使用iterm2进行rzsz 网站设置301重定向
centos 安装Nodejs centos安装supervisor centos 7 修改ssh、ftp端口 64位win10搭建react-native 网站设置301重定向 linux 统计IP访问
标签聚合
golang mysql go-redis redigo iterm2 scrapy redis git Flask centos

COPYRIGHT © 2024 泡面师. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS