Module xg :: Class JobSpecification
[show private | hide private]
[frames | no frames]

Class JobSpecification


A class used for constructing multi-task batch jobs.
Method Summary
  __init__(self)
This class is used to setup the plist file for multi-task jobs.
  addFile(self, filepath, filename, isExecutable)
Specifies a local file to copy to the Xgrid agents.
  addTask(self, cmd, args, env, inputStream, dependsOnTasks)
Adds a task to the jobSpecification.
  copyTask(self)
  delFile(self, fileName)
Deletes the file named filename from the JobSpecification.
  delTask(self, task)
Deletes the task named task.
  dependsOnJobs(self)
Returns the value of dependsOnJobs.
  editTask(self)
  email(self)
Returns the notification email.
  files(self)
Prints a list of included filenames.
  jobSpec(self)
Prints the full job specification dictionary.
  minimumTaskCount(self)
Returns the value of minimumTaskCount.
  name(self)
Returns the job name.
  printTasks(self)
Print the task specifications of all tasks.
  setDependsOnJobs(self, jobArray)
Takes a list of Xgrid job ids that must complete before this job begins.
  setEmail(self, email)
Set the notification email for the batch job.
  setMinimumTaskCount(self, count)
Sets the min number of tasks that should be started.
  setName(self, name)
Set the name (a string) of the job.
  setTasksMustStartSimultaneously(self, simul)
Sets the tasksMustStartSimultanously flag.
  tasks(self)
Return a list of the task names.
  tasksMustStartSimultaneously(self)
Returns the value of tasksMustStartSimultaneously.

Method Details

__init__(self)
(Constructor)

This class is used to setup the plist file for multi-task jobs.

addFile(self, filepath, filename, isExecutable=0)

Specifies a local file to copy to the Xgrid agents.

This file is encoded into a base64 string and inserted into the job specification dictionary.
Parameters:
filepath - The full path of the file on the client (local) computer
           (type=unicode or str)
filename - The name to call the file on the agent
           (type=unicode or str)
isExecutable - Set to 1 if the file should be executable
           (type=boolean)

addTask(self, cmd, args=u'', env={}, inputStream=u'', dependsOnTasks=[])

Adds a task to the jobSpecification.
Parameters:
cmd - The command the execute as a string. The executable is not copied if the full path is given, otherwise it is.
           (type=str)
args - The command line arguments to be passed to the command.
           (type=list or str)
env - A Python dictionary of environment variables to use on the agents.
           (type=unicode or str)
inputStream - A local file to send to the agents that will be used a stdin for the task
           (type=unicode or str)
dependsOnTasks - A list of task ids that must complete before this one begins
           (type=list)

delFile(self, fileName)

Deletes the file named filename from the JobSpecification.

List filenames using the flies() method.

delTask(self, task)

Deletes the task named task.

List the task names using the tasks() method.

dependsOnJobs(self)

Returns the value of dependsOnJobs.

email(self)

Returns the notification email.

files(self)

Prints a list of included filenames.

jobSpec(self)

Prints the full job specification dictionary.

minimumTaskCount(self)

Returns the value of minimumTaskCount.

name(self)

Returns the job name.

printTasks(self)

Print the task specifications of all tasks.

setDependsOnJobs(self, jobArray)

Takes a list of Xgrid job ids that must complete before this job begins.

setEmail(self, email)

Set the notification email for the batch job.

setMinimumTaskCount(self, count)

Sets the min number of tasks that should be started.

setName(self, name)

Set the name (a string) of the job.

setTasksMustStartSimultaneously(self, simul)

Sets the tasksMustStartSimultanously flag.

tasks(self)

Return a list of the task names.

tasksMustStartSimultaneously(self)

Returns the value of tasksMustStartSimultaneously.

Generated by Epydoc 2.1 on Thu Dec 22 15:15:21 2005 http://epydoc.sf.net