HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //proc/self/root/usr/lib/python2.7/site-packages/salt/engines/reactor.py
# -*- coding: utf-8 -*-
'''
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 Python libs
from __future__ import absolute_import, print_function, unicode_literals


# Import salt libs
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()