• 【系统】supervisor支持多进程


    [program:deployworker]
    directory = /etc/ansible/easyAnsible/app/deploy/
    command = python Deploy.py
    process_name = %(program_name)s-%(process_num)s
    numprocs = 10
    stopsignal = QUIT
    autostart = true
    # startsecs = 30
    # startretries = 3
    autorestart = true
    # exitcodes = 0,1,2
    stdout_logfile_maxbytes = 10MB
    stdout_logfile_backups = 5
    stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
    stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
    # redirect_stderr = true
    [program:gearserver]
    directory = /etc/ansible/easyAnsible/app/dispatch/gearserver/
    command = java -jar java-gearman-service-0.6.6.jar -p 8889
    process_name = %(program_name)s
    numprocs = 1
    stopsignal = QUIT
    autostart = true
    # startsecs = 30
    # startretries = 3
    autorestart = true
    # exitcodes = 0,1,2
    stdout_logfile_maxbytes = 10MB
    stdout_logfile_backups = 5
    stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
    stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
    # redirect_stderr = true
    [program:jobworker]
    directory = /etc/ansible/easyAnsible/app/dispatch/gearwork
    command = python gearWork.py
    process_name = %(program_name)s-%(process_num)s
    numprocs = 10
    stopsignal = QUIT
    autostart = true
    # startsecs = 30
    # startretries = 3
    autorestart = true
    # exitcodes = 0,1,2
    stdout_logfile_maxbytes = 10MB
    stdout_logfile_backups = 5
    stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
    stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
    # redirect_stderr = true
    [program:webserver]
    directory = /etc/ansible/easyAnsible
    command = python manage.py runserver 0.0.0.0:80 --noreload
    process_name = %(program_name)s
    numprocs = 1
    stopsignal = QUIT
    autostart = true
    # startsecs = 30
    # startretries = 3
    autorestart = true
    # exitcodes = 0,1,2
    stdout_logfile_maxbytes = 10MB
    stdout_logfile_backups = 5
    stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
    stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
    # redirect_stderr = true
  • 相关阅读:
    宠物店4.0的安装
    《professional asp.net 2.0》读书笔记连载2
    《xhtml 入门系列》之一
    ALinq 让Mysql变得如此简单
    ALinq 入门学习(八)ALinq 对Vs2010 的支持
    教你一款极为简单实用的图表插件
    虚拟机下无法启动 Linux 系统
    怎样去突破文件依赖缓存
    jQuery 表单验证扩展(五)
    Log4Net 全方位跟踪程序运行
  • 原文地址:https://www.cnblogs.com/junneyang/p/6890897.html
Copyright © 2020-2023  润新知