#1071·asynq

[BUG] Some tasks are processed prior to scheduled time

Author: arunmittalmrsoolCreated Sep 2, 2025Updated Jun 29, 2026
Labelsbug

Describe the bug Asynq works at a precision of seconds If currentTime is 2025-08-27 16:25:16.871255 and ProcessTime is 10 seconds, then that task will be processAt 2025-08-27 16:25:26 but not at 2025-08-27 16:25:26.871255 OR 2025-08-27 16:25:27 due to https://github.com/hibiken/asynq/blob/master/internal/rdb/rdb.go#L677 (here we are storing processAt in Unix() precision, which missed extra .871255 seconds)

If user want that task to be processed only after X sec, not before that, then it can cause problem for their use case. Due to that we are missing some tasks processing.

Environment (please complete the following information):

  • OS: MacOS, Linux
  • asynq package version [e.g. v0.25.0]
  • Redis/Valkey version

To Reproduce Steps to reproduce the behavior (Code snippets if applicable):

  1. Mentioned in description

Expected behavior It should process that only after expected time.