Queue timeout processing method in request task processing and storage medium
A technology of task processing and processing methods, applied in the field of request task processing, which can solve problems such as timeout, application system unavailability, resource waste, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0063] This embodiment provides an optimized processing method for queue timeout when requesting task processing, which may include the following steps:
[0064] S1: Set the timeout period corresponding to each type of interface.
[0065] For all interfaces in the system, it is necessary to set the interface timeout time. In order to improve the setting efficiency, the classification types are set uniformly. Specifically, it is assumed that there are three types of interfaces in the system: A, B, and C; among them, type A is a key guarantee interface, and the corresponding timeout period is set to a second; type B is a general interface, and the corresponding timeout period is set to b seconds; for other interfaces of class C, set the corresponding timeout period to c seconds, where a>b>c, such as 20, 15 and 10 seconds respectively.
[0066] In an example, the timeout period of each interface is stored in the redis cache to complete the setting. The storage method is the da...
Embodiment corresponding Embodiment 1
[0081] This embodiment corresponds to Embodiment 1, and provides a specific application scenario:
[0082] 1. In a certain business system, there are 3 interfaces to provide external services, namely the interface for obtaining user information (interface A), the interface for obtaining avatar information (interface B) and the interface for obtaining session information (interface C). According to the importance, it can be understood that interface A is the most important, and its timeout period is set to 20 seconds; the importance of interface B is average, and the timeout period is set to 15 seconds; interface C is a non-key interface, and the timeout period is 10 seconds.
[0083] Suppose the relative path address of interface A is / v1.1 / getUserInfo; the relative path address of interface B is / v1.1 / getIconInfo; the relative path address of interface C is / v1.1 / getSessionInfo.
[0084] 2. When the project starts, it will automatically set the timeout time of each interface ...
Embodiment 3
[0096] This embodiment corresponds to Embodiment 1 and Embodiment 2, and provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it can implement the above-mentioned embodiment 1 or embodiment 2. The steps included in the queue timeout processing method in the request task processing. The specific steps will not be repeated here, please refer to the description of Embodiment 1 and Embodiment 2 for details.
[0097] In summary, the processing method and storage medium for queue timeout in request task processing provided by the present invention can clear expired and invalid tasks in time, save valuable resources, and improve interface response efficiency; the storage mode in the cache helps to improve query efficiency , and more conducive to management; in addition, it also has the characteristics of simple implementation, low cost and remarkable effect.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com