示例#1
0
    The pilot script by default performs initial sanity checks on WN, installs and configures
    DIRAC and runs the Job Agent to execute pending workloads in the DIRAC WMS.
    But, as said, all the actions are actually configurable.
"""

__RCSID__ = "$Id$"

import os
import sys

from pilotTools import Logger, pythonPathCheck, PilotParams, getCommand

if __name__ == "__main__":

  pythonPathCheck()

  log = Logger( 'Pilot' )

  pilotParams = PilotParams()
  if pilotParams.debugFlag:
    log.setDebug()

  pilotParams.pilotRootPath = os.getcwd()
  pilotParams.pilotScript = os.path.realpath( sys.argv[0] )
  pilotParams.pilotScriptName = os.path.basename( pilotParams.pilotScript )
  log.debug( 'PARAMETER [%s]' % ', '.join( map( str, pilotParams.optList ) ) )

  log.info( "Executing commands: %s" % str( pilotParams.commands ) )
  if pilotParams.commandExtensions:
    log.info( "Requested command extensions: %s" % str( pilotParams.commandExtensions ) )
示例#2
0
__RCSID__ = "$Id$"

import os
import sys

from pilotTools import Logger, pythonPathCheck, PilotParams, getCommand

if __name__ == "__main__":

    log = Logger('Pilot')

    pilotParams = PilotParams()
    if pilotParams.debugFlag:
        log.setDebug()
    if pilotParams.keepPythonPath:
        pythonPathCheck()
    else:
        log.info("Clearing PYTHONPATH for child processes.")
        if "PYTHONPATH" in os.environ:
            os.environ["PYTHONPATH_SAVE"] = os.environ["PYTHONPATH"]
            os.environ["PYTHONPATH"] = ""

    pilotParams.pilotRootPath = os.getcwd()
    pilotParams.pilotScript = os.path.realpath(sys.argv[0])
    pilotParams.pilotScriptName = os.path.basename(pilotParams.pilotScript)
    log.debug('PARAMETER [%s]' % ', '.join(map(str, pilotParams.optList)))

    log.info("Executing commands: %s" % str(pilotParams.commands))
    if pilotParams.commandExtensions:
        log.info("Requested command extensions: %s" %
                 str(pilotParams.commandExtensions))