Method, system and device for optimizing execution of expected timed task and medium

A technology of timing tasks and execution time, applied in the field of task processing, can solve problems such as inability to be upward compatible, no task repetition, etc., and achieve the effect of improving stability and security

Active Publication Date: 2021-09-28
SHANDONG YINGXIN COMP TECH CO LTD
View PDF7 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this method is not upwardly compatible (requires Celery version > 4.0), and does not solve the problem of repeated task execution at t...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, system and device for optimizing execution of expected timed task and medium
  • Method, system and device for optimizing execution of expected timed task and medium
  • Method, system and device for optimizing execution of expected timed task and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] In order to make the object, technical solution and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0025] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are to distinguish two entities with the same name but different parameters or parameters that are not the same, see "first" and "second" It is only for the convenience of expression, and should not be construed as a limitation on the embodiments of the present invention, which will not be described one by one in the subsequent embodiments.

[0026] According to the first aspect of the embodiments of the present invention, an embodiment of a method for optimizing the execution of expected scheduled tasks is proposed. figure 1 What is shown is a schematic diagram of an embodiment of the m...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method, system and device for optimally executing an expected timed task and a storage medium, and the method comprises the steps: responding to a received asynchronous task, and judging whether the asynchronous task is the expected timed task or not; in response to the asynchronous task being an expected timed task, judging whether a first difference value between an execution moment of the expected timed task and a current moment exceeds preset time or not; in response to the situation that a first difference value between the execution moment of the expected timed task and the current moment exceeds the preset time, storing the ID and parameter information of the expected timed task into Redis, and setting a key as an exclusive mark of the expected timed task; and calculating a second difference value between the first difference value and the preset time, and setting the timeout time of the key as a third difference value between the second difference value and a preset value. According to the method, on the basis of a release and subscription mode of a key space message of Redis, an asynchronous task calling module is redefined, and an expected timed task execution module of Celery is optimized.

Description

technical field [0001] The present invention relates to the field of task processing, and more specifically, to a method, system, computer equipment and readable medium for optimally executing expected timing tasks. Background technique [0002] Celery is an asynchronous task scheduling tool that adopts the distributed task queue mode and supports high-concurrency execution of massive tasks. Celery's architecture consists of passive middleware (usually Redis or RabbitMQ), task execution unit (worker process) and task execution result storage ( Storage database) consists of three parts, which are mostly used to perform asynchronous or timing tasks, such as: server memory, CPU, Memory usage data collection, or asynchronously initiate to execute a command to a designated server and other scenarios. [0003] In the prior art, Celery executes the ETA task asynchronously, mainly through the apply_async function that comes with Celery, using the specified parameter eta (the value i...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/54
CPCG06F9/546Y02D10/00
Inventor 徐基法张悦刘超
Owner SHANDONG YINGXIN COMP TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products