SetOutOfProcessRecogTimeout
Sets the number of seconds to wait before it is determined that a recognition action is no longer running properly.
Member of namespace
Recog_SharedSyntax
bool SetOutOfProcessRecogTimeout (StrParam)
Parameters
Numeric value that indicates the number of seconds to wait to determine that a recognition action is stalled or exited.Returns
Always True.Level
All.Details
This action sets the number of seconds to wait before it is assumed that a recognition action is no longer running correctly. When the timeout is reached, the recognition process is removed from memory. The SetOutOfProcessRecogTimeout action is effective only when out-of-process recognition is enabled by the use of a UseOutOfProcessRecog action.If a recognition action does not complete within the specified number of seconds indicated by a SetOutOfProcessRecogTimeout action or a SetEngineTimeout action, it is assumed that the recognition engine encountered a severe error. It is removed from memory and recognition automatically restarts one more time. If the recognition action completes successfully within the specified time on either the first or second attempt, that recognition action is successful. If the recognition action does not complete by the specified time on the second attempt, the recognition action is set to abort, if RecogContinueOnFailure(False) was used.
If SetOutOfProcessRecogTimeout is not called, the default value of 300 seconds is used. In normal conditions, the default value is sufficient and does not need to be changed. This value needs to be increased only if a single page consistently takes more than 5 minutes to complete, which is not a typical situation. The programmer can choose to shorten this time to reduce the time to detect failures earlier, provided there is time to perform recognition in worst case scenarios. For best results, you can set the timeout to be the same or longer than the value specified in a SetEngineTimeout action.
When a SetOutOfProcessRecogTimeout action is called, the setting is in effect for the entire batch so that you can set the value once, then call as many recognition actions as you want.
- Example
SetOutOfProcessRecogTimeout(300) UseOutOfProcessRecog(True) RecognizePageOCR_S()