HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/modjk.cpython-310.pyc
o

�N�gF�@sRdZddlZe�e�Zdd�Zdd�Zddd	�Zdd
d�Zddd
�Z	ddd�Z
dS)z
State to control Apache modjk
�NcCsdtvrdSdS)z,
    Load this state if modjk is loaded
    z
modjk.workersT)Fz modjk module could not be loaded)�__salt__�rr�E/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/modjk.py�__virtual__src	Cs�|didd�}t|t�sd|d<dt|���|d<|Stdr%d	|d<|St�d
||�zt||||d�}WntyMd|d<d|��|d<|YSwg}|��D]\}}|s_|�	|�qTd
|i|d<|rsd|d<|�d�|d<|S)z4
    Generic function for bulk worker operation
    T�)�name�result�changes�commentFrzworkers should be a list not a r
�testNz executing %s to modjk workers %s)�profilezunsupported function �statusr	z failed on some workers)
�
isinstance�list�typeZ__opts__�log�infor�KeyError�items�append)	ZsaltfuncZlbn�workersr�retZcmdret�errorsZworker�okrrr�_bulk_states4
�
�r�defaultcC�|durg}td|||�S)z�
    Stop all the workers in the modjk load balancer

    Example:

    .. code-block:: yaml

        loadbalancer:
          modjk.worker_stopped:
            - workers:
              - app1
              - app2
    Nzmodjk.bulk_stop�r�rrrrrr�worker_stopped9�rcCr)z�
    Activate all the workers in the modjk load balancer

    Example:

    .. code-block:: yaml

        loadbalancer:
          modjk.worker_activated:
            - workers:
              - app1
              - app2
    Nzmodjk.bulk_activaterrrrr�worker_activatedLr r!cCr)z�
    Disable all the workers in the modjk load balancer

    Example:

    .. code-block:: yaml

        loadbalancer:
          modjk.worker_disabled:
            - workers:
              - app1
              - app2
    Nzmodjk.bulk_disablerrrrr�worker_disabled_r r"cCr)z�
    Recover all the workers in the modjk load balancer

    Example:

    .. code-block:: yaml

        loadbalancer:
          modjk.worker_recover:
            - workers:
              - app1
              - app2
    Nzmodjk.bulk_recoverrrrrr�worker_recoverrr r#)Nr)�__doc__�logging�	getLogger�__name__rrrrr!r"r#rrrr�<module>s
	
$