%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/executors/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/executors/splay.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZej	e
�ZdZdZ
dad�Zd�Zd�Zd	�ZdS(
u.
Splay function calls across targeted minions
i(tabsolute_importtprint_functiontunicode_literalsNi,i cC@s
t�adS(N(t	_get_hasht	_HASH_VAL(topts((s8/usr/lib/python2.7/site-packages/salt/executors/splay.pyt__init__scC@s�d}d}xYttjjjtd��D]8}|||@}||d>|@}||d?A|@}q,W||d>|@}||d?A|@}||d>|@}|td	@|@S(
u}
    Jenkins One-At-A-Time Hash Function
    More Info: http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time
    I����iuidi
iiiii(t	bytearraytsalttutilststringutilstto_bytest
__grains__t
_HASH_SIZE(tbitmaskthti((s8/usr/lib/python2.7/site-packages/salt/executors/splay.pyRs&cC@st|ttt��S(N(tintRtfloatR
(t	splaytime((s8/usr/lib/python2.7/site-packages/salt/executors/splay.pyt_calc_splay-scC@s�d|kr-d|dkr-|dd}n|jdt�}|dkrZtd��n|jd�}t|�}tjd||�tj|�dS(u�
    Splay a salt function call execution time across minions over
    a number of seconds (default: 300)

    .. note::
        You *probably* want to use --async here and look up the job results later.
        If you're dead set on getting the output from the CLI command, then make
        sure to set the timeout (with the -t flag) to something greater than the
        splaytime (max splaytime + time to execute job).
        Otherwise, it's very likely that the cli will time out before the job returns.

    CLI Example:

    .. code-block:: bash

        # With default splaytime
        salt --async --module-executors='[splay, direct_call]' '*' pkg.install cowsay version=3.03-8.el6

    .. code-block:: bash

        # With specified splaytime (5 minutes) and timeout with 10 second buffer
        salt -t 310 --module-executors='[slpay, direct_call]' --executor-opts='{splaytime: 300}' '*' pkg.version cowsay
    u
executor_optsu	splaytimeiu$splaytime must be a positive integerufunuSplay is sleeping %s secs on %sN(	tgett_DEFAULT_SPLAYTIMEt
ValueErrorRtlogtdebugttimetsleeptNone(RtdatatfunctargstkwargsRtfun_nametmy_delay((s8/usr/lib/python2.7/site-packages/salt/executors/splay.pytexecute1s
(t__doc__t
__future__RRRRtloggingtsalt.utils.stringutilsRt	getLoggert__name__RRR
RRRRRR#(((s8/usr/lib/python2.7/site-packages/salt/executors/splay.pyt<module>s			

Zerion Mini Shell 1.0