Ejemplo n.º 1
0
 def __init__(self, options):
     
     self.options = options
     self.action = options.action
     self.cpus = options.cpus
     if options.walltime:
         self.walltime = WalltimeUtils.fromShortStringToSeconds(options.walltime)
     self.jobname = options.jobname
     self.filepath = options.filepath
     if self.filepath:
         self.filename = FileManager.getFilename(self.filepath)
     self.runs = options.runs
     self.memory = options.memory
     
     self.refresh_jobs()
Ejemplo n.º 2
0
'''
Created on 25/01/2013

@author: markus
'''

from grisu.jcommons.utils import WalltimeUtils
from grith.jgrith.cred import MyProxyCred, ProxyCred, AbstractCred
from grith.jgrith.cred.callbacks import CliCallback
import sys

threshold_string = sys.argv[2]
threshold = WalltimeUtils.fromShortStringToSeconds(threshold_string)

cred = None
try:
    cred = MyProxyCred.loadFromDefault()
except:
    try:
        cred = ProxyCred()
    except:
        pass
        
create_new_cred = False

if not cred:
    
    print "No credential found, we have to create a new one..."
    create_new_cred = True

else: