pulsar.managers package

Subpackages

Submodules

pulsar.managers.queued module

class pulsar.managers.queued.QueueManager(name, app, **kwds)[source]

Bases: Manager

A job manager that queues up jobs directly (i.e. does not use an external queuing software such PBS, SGE, etc…).

launch(job_id, command_line, submit_params=None, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

manager_type = 'queued_python'
run_next()[source]

Run the next item in the queue (a job waiting to run).

shutdown(timeout=None)[source]

pulsar.managers.queued_cli module

Pulsar job manager that uses a CLI interface to a job queue (e.g. Torque’s qsub, qstat, etc…).

class pulsar.managers.queued_cli.CliQueueManager(name, app, **kwds)[source]

Bases: ExternalBaseManager

launch(job_id, command_line, submit_params={}, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

manager_type = 'queued_cli'

pulsar.managers.queued_condor module

class pulsar.managers.queued_condor.CondorQueueManager(name, app, **kwds)[source]

Bases: ExternalBaseManager

Job manager backend that plugs into Condor.

get_status(job_id)[source]

Return status of job as string, currently supported statuses include ‘cancelled’, ‘running’, ‘queued’, and ‘complete’.

launch(job_id, command_line, submit_params={}, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

manager_type = 'queued_condor'

pulsar.managers.queued_drmaa module

class pulsar.managers.queued_drmaa.DrmaaQueueManager(name, app, **kwds)[source]

Bases: BaseDrmaaManager

DRMAA backed queue manager.

launch(job_id, command_line, submit_params={}, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

manager_type = 'queued_drmaa'

pulsar.managers.queued_drmaa_xsede module

class pulsar.managers.queued_drmaa_xsede.XsedeDrmaaQueueManager(name, app, **kwds)[source]

Bases: DrmaaQueueManager

DRMAA backed queue manager for XSEDE (to run the XSEDE job/user reporting script after submission).

TODO: A generalized callback framework for executing things at various points in the job lifecycle.

launch(job_id, command_line, submit_params={}, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

manager_type = 'queued_drmaa_xsede'
pulsar.managers.queued_drmaa_xsede.check_output(args)[source]

Pipe-safe (and 2.6 compatible) version of subprocess.check_output

pulsar.managers.queued_external_drmaa module

class pulsar.managers.queued_external_drmaa.ExternalDrmaaQueueManager(name, app, **kwds)[source]

Bases: BaseDrmaaManager

DRMAA backed queue manager.

get_status(job_id)[source]

Return status of job as string, currently supported statuses include ‘cancelled’, ‘running’, ‘queued’, and ‘complete’.

launch(job_id, command_line, submit_params={}, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

manager_type = 'queued_external_drmaa'

pulsar.managers.queued_pbs module

class pulsar.managers.queued_pbs.PbsQueueManager(name, app, **kwds)[source]

Bases: BaseManager

Placeholder for PBS-python backed queue manager. Not yet implemented, for many situations this would be used the DRMAA or CLI+Torque managers may be better choices or at least stop gaps.

manager_type = 'queued_pbs'

pulsar.managers.stateful module

class pulsar.managers.stateful.StatefulManagerProxy(manager, **manager_options)[source]

Bases: ManagerProxy

get_status(job_id)[source]

Compute status used proxied manager and handle state transitions and track additional state information needed.

handle_failure_before_launch(job_id)[source]
property name
preprocess_and_launch(job_id, launch_config)[source]
recover_active_jobs()[source]
set_state_change_callback(state_change_callback)[source]
setup_job(*args, **kwargs)[source]
shutdown(timeout=None)[source]

Optional.

touch_outputs(job_id, touch_outputs)[source]
trigger_state_change_callback(job_id)[source]

pulsar.managers.status module

pulsar.managers.status.is_job_done(status)[source]

Does the supplied status correspond to a finished job (done processing).

pulsar.managers.unqueued module

class pulsar.managers.unqueued.Manager(name, app, **kwds)[source]

Bases: BaseUnqueuedManager

A simple job manager that just directly runs jobs as given (no queueing). Preserved for compatibilty with older versions of Pulsar client code where Galaxy is used to maintain queue (like Galaxy’s local job runner).

get_status(job_id)[source]

Return status of job as string, currently supported statuses include ‘cancelled’, ‘running’, ‘queued’, and ‘complete’.

kill(job_id)[source]

End or cancel execution of the specified job.

launch(job_id, command_line, submit_params={}, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

manager_type = 'unqueued'

Module contents

class pulsar.managers.ManagerInterface[source]

Bases: object

Defines the interface to various job managers.

abstract clean(job_id)[source]

Delete job directory and clean up resources associated with job with id job_id.

abstract get_status(job_id)[source]

Return status of job as string, currently supported statuses include ‘cancelled’, ‘running’, ‘queued’, and ‘complete’.

abstract job_directory(job_id)[source]

Return a JobDirectory abstraction describing the state of the job working directory.

abstract job_stderr_contents(job_id)[source]

After completion, return contents of stderr of the job as produced by the job runner.

abstract job_stdout_contents(job_id)[source]

After completion, return contents of stdout of the job as produced by the job runner.

abstract kill(job_id)[source]

End or cancel execution of the specified job.

abstract launch(job_id, command_line, submit_params={}, dependencies_description=None, env=[], setup_params=None)[source]

Called to indicate that the client is ready for this job with specified job id and command line to be executed (i.e. run or queue this job depending on implementation).

abstract return_code(job_id)[source]

Return integer indicating return code of specified execution or PULSAR_UNKNOWN_RETURN_CODE.

abstract setup_job(input_job_id, tool_id, tool_version)[source]

Setup a job directory for specified input (galaxy) job id, tool id, and tool version.

abstract stderr_contents(job_id)[source]

After completion, return contents of stderr of the tool script.

abstract stdout_contents(job_id)[source]

After completion, return contents of stdout of the tool script.

class pulsar.managers.ManagerProxy(manager)[source]

Bases: object

Subclass to build override proxy a manager and override specific functionality.

clean(*args, **kwargs)[source]
get_status(*args, **kwargs)[source]
job_directory(*args, **kwargs)[source]
job_stderr_contents(*args, **kwargs)[source]
job_stdout_contents(*args, **kwargs)[source]
kill(*args, **kwargs)[source]
launch(*args, **kwargs)[source]
property object_store
return_code(*args, **kwargs)[source]
setup_job(*args, **kwargs)[source]
shutdown(timeout=None)[source]

Optional.

stderr_contents(*args, **kwargs)[source]
stdout_contents(*args, **kwargs)[source]
system_properties()[source]