Leadtools.Cloud.Job Namespace > JobBase Class : OnJobTerminated Method |
public virtual bool OnJobTerminated( string id, string jobMetadata, TerminationType type )
'Declaration Public Overridable Function OnJobTerminated( _ ByVal id As String, _ ByVal jobMetadata As String, _ ByVal type As TerminationType _ ) As Boolean
'Usage Dim instance As JobBase Dim id As String Dim jobMetadata As String Dim type As TerminationType Dim value As Boolean value = instance.OnJobTerminated(id, jobMetadata, type)
public virtual bool OnJobTerminated( string id, string jobMetadata, TerminationType type )
function Leadtools.Cloud.Job.JobBase.OnJobTerminated( id , jobMetadata , type )
public: virtual bool OnJobTerminated( String^ id, String^ jobMetadata, TerminationType type )
When a worker assembly is terminated unexpectedly, or the windows service forcibly terminates the process, the windows service will re-launch the worker process and call the OnJobTerminated method.
This method allows the user to react to critical failures. If this method is overridden, it can update the job status by calling either the SetFailureStatus method or the SetCompletedStatus method. If one of these methods is called, the OnJobTerminated return value should be set to true. This indicates that the job status update has been handled.
If this method is not overridden or returns false, the cloud framework will internally call SetFailureStatus.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2