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

UpdatePercentage Method






ID (GUID) of the job to update.
Progress (0-100) of the current job.
Metadata which contains any extra information about the job as reported by the worker assembly.
Sends updated progress information for the current job to the windows service.
Syntax
public bool UpdatePercentage( 
   string jobID,
   int percentage,
   string workerMetadata
)
'Declaration
 
Public Function UpdatePercentage( _
   ByVal jobID As String, _
   ByVal percentage As Integer, _
   ByVal workerMetadata As String _
) As Boolean
'Usage
 
Dim instance As JobBase
Dim jobID As String
Dim percentage As Integer
Dim workerMetadata As String
Dim value As Boolean
 
value = instance.UpdatePercentage(jobID, percentage, workerMetadata)
public bool UpdatePercentage( 
   string jobID,
   int percentage,
   string workerMetadata
)
 function Leadtools.Cloud.Job.JobBase.UpdatePercentage( 
   jobID ,
   percentage ,
   workerMetadata 
)
public:
bool UpdatePercentage( 
   String^ jobID,
   int percentage,
   String^ workerMetadata
) 

Parameters

jobID
ID (GUID) of the job to update.
percentage
Progress (0-100) of the current job.
workerMetadata
Metadata which contains any extra information about the job as reported by the worker assembly.

Return Value

A boolean indicating of processing should continue for this job (true = continue processing; false = stop processing).
Remarks

A value of false indicates the job was either aborted or deleted by an administrator or client.

Failure to update the progress can cause the windows service to assume the process is hung. This will result in the OnJobTerminated method to be called and the the process will be terminated.

Progress should be posted at the interval specified by the percentage parameter.

If an emtpy string is passed for the workerMetadata parameter, the existing worker metadata for the job is maintained. For more information on how the workerMetadata property is used, refer to Understanding The LEADTOOLS Cloud Database.

Example
Refer to the OCRCloudDemo. Depending on the programming language being used, the demo will be found in either the <installationdir>\Examples\DotNet\CS\OCRCloudDemo directory. or the <installationdir>\Examples\DotNet\VB\OCRCloudDemo directory. The <installationdir> represents the directory in which you installed the LEADTOOLS toolkit.
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
Understanding The LEADTOOLS Cloud Database

 

 


Products | Support | Contact Us | Copyright Notices

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