def fork_job(mod_name, func_name, args=(), kwargs={}, timeout=300, cwd=None, priority=u'normal', env={}, no_output=False, heartbeat=None, abort=None, module_is_source_code=False):
 ans = {u'result': None, u'stdout_stderr': None}
 (listener, w) = create_worker(env, priority, cwd)
 try:
  communicate(ans, w, listener, (mod_name, func_name, args, kwargs, module_is_source_code), timeout=timeout, heartbeat=heartbeat, abort=abort)
 finally:
  t = Thread(target=w.kill)
  t.daemon = True
  t.start()
  if no_output:
   try:
    os.remove(w.log_path)
   except:
    pass
 if (not no_output):
  ans[u'stdout_stderr'] = w.log_path
 return ans

def fork_job ( mod_name , func_name , args = ( ) , kwargs = { } , timeout = 300 , cwd = None , priority = u'normal' , env = { } , no_output = False , heartbeat = None , abort = None , module_is_source_code = False ) : ans = { u'result' : None , u'stdout_stderr' : None } ( listener , w ) = create_worker ( env , priority , cwd ) try : communicate ( ans , w , listener , ( mod_name , func_name , args , kwargs , module_is_source_code ) , timeout = timeout , heartbeat = heartbeat , abort = abort ) finally : t = Thread ( target = w . kill ) t . daemon = True t . start ( ) if no_output : try : os . remove ( w . log_path ) except : pass if ( not no_output ) : ans [ u'stdout_stderr' ] = w . log_path return ans
run a job in a worker process .