Repository URL to install this package:
|
Version:
4.2.1 ▾
|
U
B]Õ ã @ sn d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlm Z ddlm
Z
ddlmZ ddlmZ ddl
mZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ G dd dZG dd dZejjejjejjfZG dd dejZ G dd dej!Z"dd Z#G dd dZ$dd Z%dd Z&G dd d e$Z'd$d!d"Z(e)d#krje( dS )%a supervisorctl -- control applications run by supervisord from the cmd line.
Usage: %s [options] [action [arguments]]
Options:
-c/--configuration FILENAME -- configuration file path (searches if not given)
-h/--help -- print usage message and exit
-i/--interactive -- start an interactive shell after executing commands
-s/--serverurl URL -- URL on which supervisord server is listening
(default "http://localhost:9001").
-u/--username USERNAME -- username to use for authentication with server
-p/--password PASSWORD -- password to use for authentication with server
-r/--history-file -- keep a readline history (if readline is available)
action [arguments] -- see below
Actions are commands like "tail" or "stop". If -i is specified or no action is
specified on the command line, a "shell" interpreting actions typed
interactively is started. Use the action "help" to find out about available
actions.
é N)Ú xmlrpclib)Úurlparse)Úunicode)Ú raw_input)Ú as_string)Úasyncore_25)Ú
ClientOptions©Ú
make_namespec)Úsplit_namespec)Úxmlrpc)Ústates)Úhttp_clientc @ s( e Zd ZdZdZdZdZdZdZdZ dS ) ÚLSBInitExitStatusesr é é é é é é N)
Ú__name__Ú
__module__Ú__qualname__ÚSUCCESSÚGENERICÚINVALID_ARGSÚUNIMPLEMENTED_FEATUREÚINSUFFICIENT_PRIVILEGESÚ
NOT_INSTALLEDÚNOT_RUNNING© r r ú'./build/lib/supervisor/supervisorctl.pyr / s r c @ s e Zd ZdZdZdS )ÚLSBStatusExitStatusesr r N)r r r r ÚUNKNOWNr r r r! r" 8 s r" c @ sH e Zd ZdZdd Zdd Zdd Zdd Zd
d Zdd
Z dd Z
dS )Úfgthreadz· A subclass of threading.Thread, with a kill() method.
To be used for foreground output/error streaming.
http://mail.python.org/pipermail/python-list/2004-May/260937.html
c C sh t j | ¡ d| _|| _|| _t ¡ | _t | j| jj
j| jj
j¡| _
t | j| jj
j| jj
j¡| _d S )NF)Ú threadingÚThreadÚ__init__ÚkilledÚprogramÚctlr ÚListenerÚlistenerÚHTTPHandlerÚoptionsÚusernameÚpasswordÚoutput_handlerÚ
error_handler)Úselfr) r* r r r! r' F s
þþzfgthread.__init__c C s | j | _| j| _ tj | ¡ d S ©N)ÚrunÚ_fgthread__run_backupÚ_fgthread__runr% r&