SetRecogFailureRetryDelay

Sets the number of seconds to wait before restarting a failed recognition action.

Member of namespace

Recog_Shared

Syntax

bool SetRecogFailureRetryDelay (StrParam)

Parameters

Numeric value indicating the number of seconds to wait before restarting a failed recognition action, and automatically reactivating recognition one more time.

Returns

Always True.

Level

All.

Details

This action sets the number of seconds to wait after the time specified in either a SetOutOfProcessRecogTimeOut action or a SetEngineTimeout action has expired. Once either timeout has occurred, the recognition engine is removed from memory: the action will then wait the additional time specified by the SetRecogFailureRetryDelay action to be sure that the engine has exited before restarting recognition. SetRecogFailureRetryDelay only has an effect if out-of-process recognition has been enabled by a UseOutOfProcessRecog action.

If a recognition action does not complete within the number of seconds specified by a SetOutOfProcessRecog action or a SetEngineTimeout action, it is assumed that the recognition engine has encountered a severe error and that recognition will automatically be restarted one more time. If the recognition action completes successfully within the specified time on either the first or second attempt, that recognition action will be successful. If the recognition action does not complete by the specified time on the second attempt, the recognition action will be set to abort if RecogContinueOnFailure(False) has been used.

If SetRecogFailureRetryDelay is not specifically called, the default value of 10 seconds is used. Under normal conditions, the default value will be sufficient and does not need to be changed. This value needs to be increased only if a log indicates that errors are occurring when attempting to restart a failed recognition action, and the problem can be diagnosed by setting the RecogStatus to "4".

When SetRecogFailureRetryDelayDelay is called, its setting will be in effect for the entire batch. This allows you to set the value once, and call as many recognition actions as necessary.

Example
SetRecogFailureRetryDelay(10)
UseOutOfProcessRecog(True)
RecognizePageOCR_S()