Ottieni statistiche della coda
GET/v1/environments/{environment_id}/work/stats
Ottieni statistiche sulla coda di lavoro per un ambiente.
Parameters
Returns
Ottieni statistiche della coda
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
}