HEX
Server: Apache
System: Linux server.enlacediseno.com 4.18.0-553.62.1.el8_10.x86_64 #1 SMP Wed Jul 16 04:08:25 EDT 2025 x86_64
User: maor (1069)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/engines/reactor.py
"""
Setup Reactor

Example Config in Master or Minion config

.. code-block:: yaml

    engines:
      - reactor:
          refresh_interval: 60
          worker_threads: 10
          worker_hwm: 10000

    reactor:
      - 'salt/cloud/*/destroyed':
        - /srv/reactor/destroy/*.sls

"""

import salt.utils.reactor


def start(refresh_interval=None, worker_threads=None, worker_hwm=None):
    if refresh_interval is not None:
        __opts__["reactor_refresh_interval"] = refresh_interval
    if worker_threads is not None:
        __opts__["reactor_worker_threads"] = worker_threads
    if worker_hwm is not None:
        __opts__["reactor_worker_hwm"] = worker_hwm

    salt.utils.reactor.Reactor(__opts__).run()