On Mon, May 23, 2011 at 02:50:14PM +0200, Michael Hanselmann wrote:
> With LU-generated jobs only the ID is known.
> ---
>  lib/cli.py |   28 +++++++++++++++++++++++-----
>  1 files changed, 23 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/cli.py b/lib/cli.py
> index 10bcf95..db3ada6 100644
> --- a/lib/cli.py
> +++ b/lib/cli.py
> @@ -2948,15 +2948,32 @@ class JobExecutor(object):
>      self.opts = opts
>      self.feedback_fn = feedback_fn
>  
> +  @staticmethod
> +  def _IfName(name, fmt):
> +    """Helper function for formatting name.
> +
> +    """
> +    if name:
> +      return fmt % name
> +
> +    return ""
> +
>    def QueueJob(self, name, *ops):
>      """Record a job for later submit.
>  
>      @type name: string
>      @param name: a description of the job, will be used in WaitJobSet
> +
>      """
>      SetGenericOpcodeOpts(ops, self.opts)
>      self.queue.append((name, ops))
>  
> +  def AddJobId(self, name, status, job_id):
> +    """Adds a job ID to the internal queue.
> +
> +    """
> +    self.jobs.append((0, status, job_id, name))

In what context will this be used? And why are you using duplicate
indices, do we simply not care?

iustin

Reply via email to