Example #1
0
def submit(silent=False):
    now = int(time())
    frozen_outcfg = outcfg.replace('local', 'local_%i' % now)
    system('cp %s %s' % (outcfg, frozen_outcfg))

    s = jm.Submission(frozen_outcfg, workdir + '/submission.pkl')
    s.execute()
    s.save()

    if not silent:
        statii = s.query_status()
        print 'Job summary:'
        for k, v in statii.iteritems():
            print '\t %10s : %5i' % (k, len(v))
Example #2
0
#!/usr/bin/env python

from sys import argv
from os import system, getenv, getuid
from time import time
import PandaCore.Tools.job_management as jm

logpath = getenv('SUBMIT_LOGDIR')
workpath = getenv('SUBMIT_WORKDIR')
cfgpath = workpath + '/local.cfg'

now = int(time())
frozen_cfgpath = cfgpath.replace('local', 'local_%i' % now)
system('cp %s %s' % (cfgpath, frozen_cfgpath))

if getenv('SUBMIT_CONFIG'):
    jm.setup_schedd(getenv('SUBMIT_CONFIG'))

s = jm.Submission(frozen_cfgpath, workpath + '/submission.pkl')
if len(argv) > 1:
    s.execute(int(argv[1]))
else:
    s.execute()
s.save()

statii = s.query_status()
print 'Job summary:'
for k, v in statii.iteritems():
    print '\t %10s : %5i' % (k, len(v))