Automatic retry device and method based on reflection mechanism
A reflection mechanism and automatic technology, applied in the direction of response error generation, redundant operation data error detection, instrumentation, etc., can solve problems such as task processing failure, inconsistency, data inconsistency between services, etc., to ensure stable, The effect of ensuring business data consistency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0041] see figure 1 , an automatic retry device based on reflection mechanism of the present invention, comprising:
[0042] The task information storage module is used for storing the failed task information in the database after the task fails;
[0043] Task automatic retry module, when the time condition is reached, the application fetches the task information from the database and starts retrying through the reflection mechanism;
[0044] In the task processing strategy module, when the task retry fails, the number of retries will be increased by 1, and the retry will continue when the time condition is reached again. When the number of retries reaches the threshold, the corresponding processing strategy will be adopted.
[0045] The task information includes the class of the task, the method of executing the task, the task parameters, the number of retries and other parameters required in practical applications.
[0046] The task information is divided into different qu...
Embodiment 2
[0059] An automatic retry method based on a reflection mechanism of the present invention is based on the device of Embodiment 1, and the steps are as follows:
[0060] Step S1, the application receives the task request and executes corresponding business processing;
[0061] Step S2. When the application processing task fails, store the failure information in the database;
[0062] Step S3, when the time condition is reached, the application fetches the task information from the database, and starts retrying through the reflection mechanism;
[0063] Step S4. When the task retry fails, add 1 to the number of retries, and continue to retry when the time condition is reached again. When the number of retries reaches the threshold, adopt a corresponding processing strategy:
[0064] A. Discard: discard the task without retrying;
[0065] B. Continue to retry: the task continues to be saved, and after the set time condition, continue to retry;
[0066] C. Notify operation and ma...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


