Ejemplo n.º 1
0
def exe_condor_advertise(fname, command, pool, is_multi=False, use_tcp=False):
    """
    Wrapper to execute condorAdvertise from the condorManager
    """

    logSupport.log.debug("CONDOR ADVERTISE %s %s %s %s %s" % (fname, command,
                                                              pool, is_multi,
                                                              use_tcp))
    return condorManager.condorAdvertise(fname, command, use_tcp,
                                         is_multi, pool)
Ejemplo n.º 2
0
def exe_condor_advertise(fname, command,
                         is_multi=False):
    global factoryConfig

    lock_fname=os.path.join(factoryConfig.lock_dir,"gfi_advertize.lock")
    if not os.path.exists(lock_fname): #create a lock file if needed
        try:
            fd=open(lock_fname,"w")
            fd.close()
        except:
            # could be a race condition
            pass
    
    fd=open(lock_fname,"r+")
    try:
        fcntl.flock(fd,fcntl.LOCK_EX)
        try:
            ret = condorManager.condorAdvertise(fname, command, factoryConfig.advertise_use_tcp, is_multi)
        finally:
            fcntl.flock(fd,fcntl.LOCK_UN)
    finally:
        fd.close()

    return ret
Ejemplo n.º 3
0
def exe_condor_advertise(fname,command, pool, is_multi=False):
    return condorManager.condorAdvertise(fname, command, 
                                         frontendConfig.advertise_use_tcp,
                                         is_multi, pool)
Ejemplo n.º 4
0
def exe_condor_advertise(fname,command,
                         is_multi=False):
    return condorManager.condorAdvertise(fname,command,factoryConfig.advertise_use_tcp,is_multi)
Ejemplo n.º 5
0
def exe_condor_advertise(fname, command, pool, is_multi=False):
    logSupport.log.debug("CONDOR ADVERTISE %s %s %s %s" % (fname, command, pool, is_multi))
    return condorManager.condorAdvertise(fname, command, frontendConfig.advertise_use_tcp, is_multi, pool)