def __init__(self, basedir, name, bufsize=500): self.name = name self.qdir = os.path.join(basedir, str(name)) FileEnqueue.recover(self.qdir) self.enq = FileEnqueue(self.qdir, buffer=bufsize, suffix='d') self.queuedcount = 0
def __init__(self, wsdir, wsid): self.wsid = wsid self.qdir = os.path.join(wsdir, str(self.wsid)) FileEnqueue.recover(self.qdir) self.enq = FileEnqueue(self.qdir, buffer=500) self.scheduledcount = 0
def __init__(self, jobname, bufsize=20): self.qdir = os.path.join(hqconfig.get('datadir'), jobname, 'ex') if not os.path.isdir(self.qdir): os.makedirs(self.qdir) FileEnqueue.recover(self.qdir) self.enq = FileEnqueue(self.qdir, buffer=bufsize, suffix='ex') self.queuedcount = 0
def __init__(self, qdir, noupdate=False, norecover=False, **kw): # ensure qdir directory exists self.qdir = qdir if not os.path.isdir(self.qdir): os.makedirs(self.qdir) self.addedcount = 0 self.processedcount = 0 self.rqfile = None self.qfiles = None if not norecover: FileEnqueue.recover(self.qdir) self.init_queues(**kw)
def __init__(self, wsdir, wsid, writing=False): self.wsid = wsid self.qdir = os.path.join(wsdir, str(self.wsid)) if writing: FileEnqueue.recover(self.qdir) self.enq = FileEnqueue(self.qdir, buffer=200) else: self.enq = DummyFileEnqueue(self.qdir) self.deq = FileDequeue(self.qdir) self.running = True self.scheduledcount = 0 self.checkedoutcount = 0 self.finishedcount = 0 self.activecount = 0