Determining how long a task has been enqueued #523
Replies: 2 comments 3 replies
-
Currently looking at the Latency queue stats to see if they'll work for what we need |
Beta Was this translation helpful? Give feedback.
-
@lindsayweil-sl Thanks for opening a discussion! Asynq internals records timestamps for each task when it transitioned to "pending" state. This time should be roughly the time user specifies in Currently, we provide "Queue latency" which is the oldest pending tasks in a given queue. However, I think it's valuable to provide age of task in |
Beta Was this translation helpful? Give feedback.
-
I've been looking through the documentation and not finding a way to do this, so hoping someone might have seen something that I am overlooking. I would like to know how long a given task has been enqueued for monitoring purposes - to know if it was enqueued 2 minutes ago, for example, and report this to our monitoring tools.
I see TaskInfo has retry and failure timestamps, and opts has processAt, but I'm not seeing a way from a task to know when it was enqueued. Is there a time component that I'm overlooking?
Beta Was this translation helpful? Give feedback.
All reactions