Package schrodinger :: Package application :: Package desmond :: Module cmj :: Class Queue
[hide private]
[frames] | no frames]

Class Queue

object --+
         |
        Queue

Instance Methods [hide private]
 
__init__(self, host, max_limit=0, max_retry=0, sleep=10)
`host' specifies hosts and maximum numbers of jobs for each host by passing a list of (<host>, <max_jobs>) tuples.
 
_allocate_impl(self, num_cpu)
 
_get_host(self, raw_host)
 
_push_to_jobdj(self, job)
`job' must be a single job object.
 
allocate(self, num_cpu)
 
free(self, host, num_cpu)
 
push(self, job)
`job' can be a single job object or a list of job objects.
 
refill_queue(self)
 
reset(self, host, max_limit=0, max_retry=0, sleep=10)
 
run(self)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, host, max_limit=0, max_retry=0, sleep=10)
(Constructor)

 

`host' specifies hosts and maximum numbers of jobs for each host by passing a list of (<host>, <max_jobs>) tuples.

Overrides: object.__init__

push(self, job)

 

`job' can be a single job object or a list of job objects. `job's pushed into this `Queue' object are waiting for being processed. There are two ways for a job to go: (1) it is launched to run if it has not yet run; (2) if it has finished running, it will be removed from this `Queue' object, and `job.finish()' will be called to terminate the job.