예제 #1
0
def query_configuration(parser_args):
    """ Queries process state """
    from synergy.system import process_helper
    from synergy.conf import context

    process_names = [parser_args.process_name] if parser_args.process_name else list(context.process_context)
    for process_name in process_names:
        process_helper.poll_process(process_name)
    sys.stdout.write('\n')
예제 #2
0
파일: launch.py 프로젝트: mushkevych/grazer
def query_configuration(parser_args):
    """ Queries process state """
    from synergy.system import process_helper
    from synergy.conf import context

    process_names = [parser_args.process_name] if parser_args.process_name else context.process_context.keys()
    for process_name in process_names:
        process_helper.poll_process(process_name)
    sys.stdout.write('\n')
예제 #3
0
파일: launch.py 프로젝트: NMerch/grazer
def stop_process(options):
    """Stop specific daemon"""
    from synergy.system import process_helper

    try:
        pid = process_helper.get_process_pid(options.app)
        if pid is None or process_helper.poll_process(options.app) is False:
            message = 'ERROR: Process %r is already terminated %r\n' % (options.app, pid)
            sys.stderr.write(message)
            sys.exit(1)

        process_helper.kill_process(options.app)
    except Exception as e:
        sys.stderr.write('Exception on killing %s : %s \n' % (options.app, str(e)))
        traceback.print_exc(file=sys.stderr)
예제 #4
0
def stop_process(parser_args):
    """ Stop/Kill specific daemon"""
    from synergy.system import process_helper

    try:
        pid = process_helper.get_process_pid(parser_args.process_name)
        if pid is None or process_helper.poll_process(parser_args.process_name) is False:
            message = 'ERROR: Process {0} is already terminated {1}\n'.format(parser_args.process_name, pid)
            sys.stderr.write(message)
            sys.exit(1)

        process_helper.kill_process(parser_args.process_name)
    except Exception as e:
        sys.stderr.write('Exception on killing {0} : {1}\n'.format(parser_args.process_name, e))
        traceback.print_exc(file=sys.stderr)
예제 #5
0
파일: launch.py 프로젝트: mushkevych/grazer
def stop_process(parser_args):
    """ Stop/Kill specific daemon"""
    from synergy.system import process_helper

    try:
        pid = process_helper.get_process_pid(parser_args.process_name)
        if pid is None or process_helper.poll_process(parser_args.process_name) is False:
            message = 'ERROR: Process {0} is already terminated {1}\n'.format(parser_args.process_name, pid)
            sys.stderr.write(message)
            sys.exit(1)

        process_helper.kill_process(parser_args.process_name)
    except Exception as e:
        sys.stderr.write('Exception on killing {0} : {1}\n'.format(parser_args.process_name, str(e)))
        traceback.print_exc(file=sys.stderr)
예제 #6
0
파일: launch.py 프로젝트: NMerch/grazer
def query_configuration(options):
    """ Queries process state """
    from synergy.system import process_helper

    process_helper.poll_process(options.app)