def eventsender_process(data, tag, wait=0): proc = EventSender(data, tag, wait) proc.start() try: yield finally: clean_proc(proc)
def eventpublisher_process(): proc = event.EventPublisher({'sock_dir': SOCK_DIR}) proc.start() try: if os.environ.get('TRAVIS_PYTHON_VERSION', None) is not None: # Travis is slow time.sleep(10) else: time.sleep(2) yield finally: clean_proc(proc)
def eventpublisher_process(sock_dir): proc = salt.utils.event.EventPublisher({"sock_dir": sock_dir}) proc.start() try: if os.environ.get("TRAVIS_PYTHON_VERSION", None) is not None: # Travis is slow time.sleep(10) else: time.sleep(2) yield finally: clean_proc(proc)
def reactor_process(opts, reactor): opts = dict(opts) opts['reactor'] = reactor proc = event.Reactor(opts) proc.start() try: if os.environ.get('TRAVIS_PYTHON_VERSION', None) is not None: # Travis is slow time.sleep(10) else: time.sleep(2) yield finally: clean_proc(proc)
def reactor_process(opts, reactor): opts = dict(opts) opts['reactor'] = reactor proc = reactor.Reactor(opts) proc.start() try: if os.environ.get('TRAVIS_PYTHON_VERSION', None) is not None: # Travis is slow time.sleep(10) else: time.sleep(2) yield finally: clean_proc(proc)