←Select platform

OnJobTerminated Method

Summary

Responds to a job that unexpectedly terminates, or when a process is forcibly terminated by the windows service.

Syntax

C#
VB
C++
public virtual bool OnJobTerminated( 
   string id, 
   string jobMetadata, 
   TerminationType type 
) 
  
Public Overridable Function OnJobTerminated( _ 
   ByVal id As String, _ 
   ByVal jobMetadata As String, _ 
   ByVal type As Leadtools.Jobprocessor.Job.TerminationType _ 
) As Boolean 
public: 
virtual bool OnJobTerminated(  
   String^ id, 
   String^ jobMetadata, 
   Leadtools.Jobprocessor.Job.TerminationType type 
)  

Parameters

id
ID (GUID) of the job which was terminated.

jobMetadata
Metadata which contains information on how this job should be processed.

type
Reason the job terminated.

Return Value

true to indicate that the job status was updated by the user assembly.

Remarks

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 LEADTOOLS Distributed Computing (Job Processor) SDK will internally call SetFailureStatus.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.