HangfireIO / HangfireIO/Hangfire
Hangfire EnqueueAt not being honored (due to queue being set)
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
I'm using Hangfire 1.6.12.
When trying to schedule/delay a task, the task executes immediately.
From the database, I can see the data reflecting the desired outcome (ie delay for 15 mins):
`Scheduled {"EnqueueAt":"2023-04-24T12:01:32.7745570Z","ScheduledAt":"2023-04-24T11:46:32.7745570Z"}`
but it is enqueued and executed immediately:
`Enqueued {"EnqueuedAt":"2023-04-24T11:46:32.7901759Z","Queue":"my-custm-queue"}`
Usage:
```IBackgroundJobClient hangFireClient = new BackgroundJobClient();
Timespan delay = Timespan.FromMinutes(15);
string jobId = hangFireClient.Schedule(task, delay);
// Put it on a specific queue
EnqueuedState queueState = new EnqueuedState(queue);
hangFireClient.ChangeState(jobId, queueState);
```
this is clearly due to the last two lines, but how would you schedule a task on a specific queue?
Contributor guide
Assessment
This issue has not been assessed yet.