%PDF- %PDF-
| Direktori : /proc/thread-self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/executors/ |
| Current File : //proc/thread-self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/executors/splay.pyo |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z e j e
� Z d Z d Z
d a d � Z d � Z d � Z d � Z d S(
u.
Splay function calls across targeted minions
i ( t absolute_importt print_functiont unicode_literalsNi, i c C@ s
t � a d S( N( t _get_hasht _HASH_VAL( t opts( ( s8 /usr/lib/python2.7/site-packages/salt/executors/splay.pyt __init__ s c C@ s� d } d } xY t t j j j t d � � D]8 } | | | @} | | d >| @} | | d ?A| @} q, W| | d >| @} | | d ?A| @} | | d >| @} | t d @| @S(
u}
Jenkins One-At-A-Time Hash Function
More Info: http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time
I���� i u idi
i i i i i ( t bytearrayt saltt utilst stringutilst to_bytest
__grains__t
_HASH_SIZE( t bitmaskt ht i( ( s8 /usr/lib/python2.7/site-packages/salt/executors/splay.pyR s &c C@ s t | t t t � � S( N( t intR t floatR
( t splaytime( ( s8 /usr/lib/python2.7/site-packages/salt/executors/splay.pyt _calc_splay- s c C@ s� d | k r- d | d k r- | d d } n | j d t � } | d k rZ t d � � n | j d � } t | � } t j d | | � t j | � d S( 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 splaytimei u$ splaytime must be a positive integeru funu Splay is sleeping %s secs on %sN( t gett _DEFAULT_SPLAYTIMEt
ValueErrorR t logt debugt timet sleept None( R t datat funct argst kwargsR t fun_namet my_delay( ( s8 /usr/lib/python2.7/site-packages/salt/executors/splay.pyt execute1 s
( t __doc__t
__future__R R R R t loggingt salt.utils.stringutilsR t getLoggert __name__R R R
R R R R R R# ( ( ( s8 /usr/lib/python2.7/site-packages/salt/executors/splay.pyt <module> s