[PR #956] [MERGED] Add the scheduler option HeartbeatInterval #948

Closed
opened 2026-03-02 06:10:34 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/956
Author: @pior
Created: 11/4/2024
Status: Merged
Merged: 11/7/2024
Merged by: @kamikazechaser

Base: masterHead: heartbeat-interval


📝 Commits (2)

  • f47975a Add the scheduler option HeartbeatInterval
  • f4df3a0 Fix possible premature expiration of scheduler entries

📊 Changes

2 files changed (+45 additions, -27 deletions)

View changed files

📝 internal/rdb/rdb.go (+3 -3)
📝 scheduler.go (+42 -24)

📄 Description

Context

From https://github.com/hibiken/asynq/issues/510:

Currently the tick interval of Scheduler.runHeartbeater() and the ttl of WriteSchedulerEntries() are both 5*time.Second
scheduler entries is prone to expire when redis is slow to respond

Redo of https://github.com/hibiken/asynq/pull/896

Fixes https://github.com/hibiken/asynq/issues/510

Changes

  • Add option SchedulerOpts.HeartbeatInterval
  • Change default scheduler heartbeat interval from 5s to 10s

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynq/pull/956 **Author:** [@pior](https://github.com/pior) **Created:** 11/4/2024 **Status:** ✅ Merged **Merged:** 11/7/2024 **Merged by:** [@kamikazechaser](https://github.com/kamikazechaser) **Base:** `master` ← **Head:** `heartbeat-interval` --- ### 📝 Commits (2) - [`f47975a`](https://github.com/hibiken/asynq/commit/f47975ac187be696b5bd53708280794becbc2584) Add the scheduler option HeartbeatInterval - [`f4df3a0`](https://github.com/hibiken/asynq/commit/f4df3a039da279133b207d8e86655312ed792310) Fix possible premature expiration of scheduler entries ### 📊 Changes **2 files changed** (+45 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `internal/rdb/rdb.go` (+3 -3) 📝 `scheduler.go` (+42 -24) </details> ### 📄 Description ## Context From https://github.com/hibiken/asynq/issues/510: > Currently the tick interval of Scheduler.runHeartbeater() and the ttl of WriteSchedulerEntries() are both 5*time.Second > scheduler entries is prone to expire when redis is slow to respond Redo of https://github.com/hibiken/asynq/pull/896 Fixes https://github.com/hibiken/asynq/issues/510 ## Changes - Add option `SchedulerOpts.HeartbeatInterval` - Change default scheduler heartbeat interval from 5s to 10s --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 06:10:34 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#948
No description provided.