parsers/src/main/python/utils/worker.py
def workN(args):
    """ Prepare the execution of the command
    :param args: the set of arguments
    :return:
    """
    cmd, log, err, to = args
    curproc = multiprocessing.current_process()
    print(curproc, "Started Process, args={}".format(args))
    lfile = open(log, 'w')
    efile = open(err, 'w')
    try:
        call(
            cmd,
            shell=True,
            stdout=lfile,
            stderr=efile,
            timeout=to,
        )
        print(curproc, "Ended Process")
    except subprocess.TimeoutExpired:
        print(curproc, "Killed Process")
    if os.path.getsize(err) == 0:
        os.remove(err)
 Prepare the execution of the command
    :param args: the set of arguments
    :return:
    
Prepare the execution of the command
Prepare the execution of the command
def workN(args):
    cmd, log, err, to = args
    curproc = multiprocessing.current_process()
    print(curproc, "Started Process, args={}".format(args))
    lfile = open(log, 'w')
    efile = open(err, 'w')
    try:
        call(
            cmd,
            shell=True,
            stdout=lfile,
            stderr=efile,
            timeout=to,
        )
        print(curproc, "Ended Process")
    except subprocess.TimeoutExpired:
        print(curproc, "Killed Process")
    if os.path.getsize(err) == 0:
        os.remove(err)
def workN ( args ) : cmd , log , err , to = args curproc = multiprocessing . current_process ( ) print ( curproc , "Started Process, args={}" . format ( args ) ) lfile = open ( log , 'w' ) efile = open ( err , 'w' ) try : call ( cmd , shell = True , stdout = lfile , stderr = efile , timeout = to , ) print ( curproc , "Ended Process" ) except subprocess . TimeoutExpired : print ( curproc , "Killed Process" ) if os . path . getsize ( err ) == 0 : os . remove ( err )
Prepare the execution of the command
Prepare the execution of the command
""" Prepare the execution of the command
    :param args: the set of arguments
    :return:
    """
None
args
the set of arguments
the set of arguments