schrodinger.job.jobhandler module¶
-
class
schrodinger.job.jobhandler.
JobHandler
(cmd, viewname=None, launch_dir=None)¶ Bases:
PyQt5.QtCore.QObject
A Job Handler for running and waiting on jobs. To use, initialize with a list of strings that you would use with JobViewFilter.launchJob. 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.-
jobCompleted
¶
-
jobProgressChanged
¶
-
__init__
(cmd, viewname=None, launch_dir=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
launchJob
()¶ Launch the job. An event loop is executed while job is being launched.
:return Job object for the started job. :rtype: jobcontrol.Job
Raises: JobLaunchFailure – if the job failed to start. NOTE: unlike jobcontrol.launch_job(), no dialog is shown on failue, so calling code is responsible by informing the user of the failure.
-
wait
()¶
-
blockSignals
(self, bool) → bool¶
-
childEvent
(self, QChildEvent)¶
-
children
(self) → List[QObject]¶
-
connectNotify
(self, QMetaMethod)¶
-
customEvent
(self, QEvent)¶
-
deleteLater
(self)¶
-
destroyed
¶ destroyed(self, object: QObject = None) [signal]
-
disconnect
(self)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dumpObjectInfo
(self)¶
-
dumpObjectTree
(self)¶
-
dynamicPropertyNames
(self) → List[QByteArray]¶
-
event
(self, QEvent) → bool¶
-
eventFilter
(self, QObject, QEvent) → bool¶
-
findChild
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject¶ findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
-
findChildren
(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]¶ findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
-
inherits
(self, str) → bool¶
-
installEventFilter
(self, QObject)¶
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
isWidgetType
(self) → bool¶
-
isWindowType
(self) → bool¶
-
killTimer
(self, int)¶
-
metaObject
(self) → QMetaObject¶
-
moveToThread
(self, QThread)¶
-
objectName
(self) → str¶
-
objectNameChanged
¶ objectNameChanged(self, str) [signal]
-
parent
(self) → QObject¶
-
property
(self, str) → Any¶
-
pyqtConfigure
(...)¶ Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
-
receivers
(self, PYQT_SIGNAL) → int¶
-
removeEventFilter
(self, QObject)¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setObjectName
(self, str)¶
-
setParent
(self, QObject)¶
-
setProperty
(self, str, Any) → bool¶
-
signalsBlocked
(self) → bool¶
-
startTimer
(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int¶
-
staticMetaObject
= <PyQt5.QtCore.QMetaObject object>¶
-
thread
(self) → QThread¶
-
timerEvent
(self, QTimerEvent)¶
-
tr
(self, str, disambiguation: str = None, n: int = -1) → str¶
-
-
schrodinger.job.jobhandler.
job_incorporated
(job_id, first_entry_id, last_entry_id)¶ The function which is called after successful incorporation of the job from maestro. It is called only if job output is incorporated through maestro job incorporation. If individual panels have their own incorporation handler registered via maestro.job_incorporation_function_add(), and the panel is currently open and has handled the incorporation, this function will not be called by Maestro.
Parameters: - job_id – The id of the incorporated job
- first_entry_id – The id of the first entry imported in the project from the output structure file associated with the given job.
- last_entry_id – The id of the last entry imported in the project from the output structure file associated with the given job.
-
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.