schrodinger.job.jobhandler module¶
-
schrodinger.job.jobhandler.
launch_job_with_callback
(cmd, callback, launch_dir=None)¶ Launch the given job, and call the specified callback when the job completes (either successfully or with a failure).
Parameters: - cmd – Command list
- callback – Function to call when the job completes (either successfully or with a failure), with Job object as the only parameter.
Raises: RuntimeError – if the job fails to start.
-
class
schrodinger.job.jobhandler.
JobHandler
¶ Bases:
object
A Job Handler for running and waiting on jobs. To use, initialize with a list of strings that you would use with jobcontrol.launch_job. Then connect
my_jobhandler.jobCompleted
to any slots that need to be executed after the job is finished. The job handler also has a wait method that will pause execution of the current event until the job is finished. Note that during the wait, other ui events will continue to be processed.If any additional arguments are required for
launch_job
, they can be passed into the constructor as keyword arguments.-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
-
schrodinger.job.jobhandler.
blocking_launch_job
(job_view_filter, job_cmd)¶ Start the given JobCommand with this panel’s JobViewFilter, and return the Job object for the launched job. This function is similar to JobViewFilter.launchJob(), except that it blocks while the job is launched, and returns a Job object for the new job.