Exemple #1
0
def cleanupTask(task):
    # cleanup task at hand

    # ----------------------------------------------------------------------------------------------
    # Get all parameters for the production
    # ----------------------------------------------------------------------------------------------
    cleaner = Cleaner(task)
    cleaner.logCleanup()

    print ''

    return
Exemple #2
0
else:
    scheduler = Scheduler(
        'submit.mit.edu', os.getenv('KRAKEN_REMOTE_USER', 'paus'),
        '/work/%s' % (os.getenv('KRAKEN_REMOTE_USER', 'paus')), nJobsMax)

# Generate the request
request = Request(scheduler, sample, config, version, py)

# Create the corresponding condor task
task = Task(condorId, request)

# Cleaning up only when you nwant to (careful cleanup only works as agent)
if not noCleanup:
    # Quick analysis of ongoing failures and related logfile cleanup
    cleaner = Cleaner(task)
    cleaner.logCleanup()

# Prepare the environment
if len(task.sample.missingJobs) > 0:

    # Make the local/remote directories
    task.createDirectories()
    task.makeTarBall()

    # Make the submit file
    task.writeCondorSubmit()

    # Submit this job
    task.condorSubmit()

# Make it clean