#NEWLINE# def setup_gunicorn_supervisor( self ) : #NEWLINE# #INDENT# context = { #NEWLINE# #INDENT# 'app_name' : context . app_name , #NEWLINE# 'app_package' : self . app_package , #NEWLINE# 'gunicorn_port' : config . get ( 'gunicorn_port' , 8000 ) , #NEWLINE# 'user' : config . get ( 'user' , 'root' ) , #NEWLINE# #UNINDENT# } #NEWLINE# upload_template ( 'templates/gunicorn_supervisor.conf' , '/etc/supervisor/conf.d/{0}_gunicorn.conf' . format ( self . app_name ) , context = context , overwrite = True ) #NEWLINE# run ( 'supervisorctl reread' ) #NEWLINE# run ( 'supervisorctl update' ) #NEWLINE# run ( 'supervisorctl restart {0}_gunicorn' . format ( self . app_name ) )