mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #671] [BUG] tasks before 8 AM are being counted towards the previous day #339
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xmwilldo on GitHub (Jun 20, 2023).
Original GitHub issue: https://github.com/hibiken/asynq/issues/671
Originally assigned to: @hibiken on GitHub.
Describe the bug
My scheduler program runs in the Asia/Shanghai time zone, and the asynq server also runs in the Asia/Shanghai environment. However, when I start it, I can see that the timestamps in the logs are not in the Asia/Shanghai time zone. I'm not sure if this is causing a problem: the scheduled tasks before 8 AM are being counted towards the previous day, which is not what I want to see.
To Reproduce
Steps to reproduce the behavior (Code snippets if applicable):
Expected behavior
The task statistics after 8 AM are for the current day.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
asynqpackage v0.22.1Additional context
Add any other context about the problem here.
@ghosx commented on GitHub (Jun 26, 2023):
Do you have reproducible code and screenshots?
@naisev commented on GitHub (Jun 30, 2023):
I have same problem.
@hibiken commented on GitHub (Jul 3, 2023):
@xmwilldo thanks for reporting an issue.
Did you specify your timezone via
SchedulerOpts.Location?If so, would you mind providing some code snippets to help me investigate further?
@xmwilldo commented on GitHub (Jul 4, 2023):
@hibiken Yes, I tried but it didn't work.
@xmwilldo commented on GitHub (Jul 4, 2023):
I have these scheduled tasks, each task executes at least ten sub-tasks, but the statistical results are as follows:
@hibiken commented on GitHub (Jul 4, 2023):
It's probably related to this one? https://github.com/hibiken/asynqmon/issues/295
UI shows everything in UTC so I think we need to open a FR to support different timezone in the UI.
@xmwilldo commented on GitHub (Jul 4, 2023):
This doesn't seem to matter, because the ui just shows the data in redis, and the data recorded in redis itself is wrong
@xmwilldo commented on GitHub (Jul 4, 2023):
like this
@hibiken commented on GitHub (Jul 8, 2023):
I see.
We need to update these helpers to be timezone aware (currently always use UTC):
github.com/hibiken/asynq@fde294be32/internal/base/base.go (L169-L172)github.com/hibiken/asynq@fde294be32/internal/base/base.go (L174-L177)This may be a good first issue for someone's who's looking to contribute.
@xmwilldo commented on GitHub (Jul 10, 2023):
I would also like to participate, but this PR#683 already exists. Thanks!
@xmwilldo commented on GitHub (Jan 11, 2024):
is there any progress ?