<@ULVA73B9P> how can I check using the api if I ha...
# marvin-in-the-wild
h
@Marvin how can I check using the api if I have jobs waiting in the queue more than 10 minutes ?
m
It appears that to check whether jobs are waiting in the queue for more than a set duration, you'll need to interact with work queues and possibly monitor the wait times using the Prefect API. However, the documents retrieved do not provide a specific API endpoint or method for checking job wait times directly. A typical approach might involve retrieving information about the jobs in the queue and calculating their wait times based on the time they were added to the queue and the current time. This would require monitoring and possibly storing timestamps when jobs are enqueued and comparing them periodically. I could not find a specific API method for this purpose in the provided documentation excerpts, but you may want to look into work queues and related API documentation for more details on how to implement this. If such a feature is not readily available, you may need to track wait times as part of your application logic. Unfortunately, the direct answer to your question isn't available in the docs I have access to, and I can't directly check the Prefect API or Prefect codebase for further specificity. If the feature for checking job queue times does not exist in Prefect's current API, you might consider putting in a feature request on their GitHub issues page if it's pivotal for your workflow.