Skip to content

Latest commit

 

History

History
69 lines (38 loc) · 3.94 KB

File metadata and controls

69 lines (38 loc) · 3.94 KB
graph LR
    Scheduler_Process_Orchestrator["Scheduler Process Orchestrator"]
    Job_Retriever["Job Retriever"]
    Job_Enqueuer["Job Enqueuer"]
    Scheduler_Lifecycle_Manager["Scheduler Lifecycle Manager"]
    Concurrency_Controller["Concurrency Controller"]
    Scheduler_Process_Orchestrator -- "depends on" --> Concurrency_Controller
    Scheduler_Process_Orchestrator -- "depends on" --> Scheduler_Lifecycle_Manager
    Scheduler_Process_Orchestrator -- "periodically invokes" --> Job_Retriever
    Scheduler_Process_Orchestrator -- "utilizes" --> Job_Enqueuer
Loading

CodeBoardingDemoContact

Details

The Scheduler Core Process subsystem is the dedicated, long-running component at the heart of rq-scheduler. It is responsible for continuously monitoring the Redis Data Store for jobs due for execution, managing its own lifecycle, ensuring single-instance operation, and orchestrating the transition of scheduled jobs into standard RQ queues.

Scheduler Process Orchestrator

The main execution loop and coordinator for the entire scheduler process. It manages the scheduler's lifecycle from startup to shutdown, including periodic tasks like heartbeat and job enqueuing.

Related Classes/Methods:

Job Retriever

Scans the scheduled jobs data (stored in Redis) to find and retrieve jobs whose scheduled time has arrived. This component is crucial for identifying tasks ready for execution.

Related Classes/Methods:

Job Enqueuer

Identifies jobs that are due for execution and pushes them into the appropriate RQ queues for processing by RQ workers. This is the bridge between the scheduler and the core RQ worker system.

Related Classes/Methods:

Scheduler Lifecycle Manager

Manages the scheduler's operational status within the Redis environment, marking its active presence or graceful termination. This includes birth registration, death registration, and heartbeat updates, ensuring the scheduler's state is known.

Related Classes/Methods:

Concurrency Controller

Implements a distributed locking mechanism to ensure that only a single instance of the rq-scheduler is actively running at any given time, preventing duplicate job processing and maintaining data integrity.

Related Classes/Methods: