获取队列统计信息
GET/v1/environments/{environment_id}/work/stats
获取某个环境的工作队列统计信息。
Parameters
Returns
获取队列统计信息
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
beta_self_hosted_work_queue_stats = client.beta.environments.work.stats(
environment_id="env_011CZkZ9X2dpNyB7HsEFoRfW",
)
print(beta_self_hosted_work_queue_stats.depth)Response 200
{
"depth": 0,
"oldest_queued_at": "oldest_queued_at",
"pending": 0,
"type": "work_queue_stats",
"workers_polling": 0
}Returns Examples
Response 200
{
"depth": 0,
"oldest_queued_at": "oldest_queued_at",
"pending": 0,
"type": "work_queue_stats",
"workers_polling": 0
}