Skip to content

[BUG] asynq options are not appalled #120

@menta2k

Description

@menta2k
  1. Line 80 in server.go: schedulerOpts: &asynq.SchedulerOpts{}
    - Creates an empty scheduler options struct
  2. Line 271 in options.go: s.schedulerOpts.Location = loc
    - The WithLocation() option correctly sets the location
  3. Line 707 in server.go: s.scheduler = asynq.NewScheduler(s.redisConnOpt, s.schedulerOpts)
    - BUT the scheduler is created in createAsynqScheduler() which is called BEFORE the options are applied!

The Problem:

The order of operations is wrong:

  1. ✅ NewServer() creates server with empty schedulerOpts
  2. ❌ createAsynqScheduler() creates scheduler with empty options (defaults to UTC)
  3. ✅ WithLocation() sets the location AFTER scheduler is already created

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions