LEADTOOLS Cloud (Leadtools.Cloud.Job assembly)
LEAD Technologies, Inc

OnJobTerminated Method






ID (GUID) of the job which was terminated.
Metadata which contains information on how this job should be processed.
Reason the job terminated.
Responds to a job that unexpectedly terminates, or when a process is forcibly terminated by the windows service.
Syntax
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
) 

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 cloud framework will internally call SetFailureStatus.

Requirements

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

See Also

Reference

JobBase Class
JobBase Members
Programming with LEADTOOLS Cloud SDK
Creating Cloud Worker Assemblies

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.