{% extends "_base.html" %} {% set active_page = "rate_limits" %} {% block title %}Rate Limits — TaskQ Admin{% endblock %} {% block content %}
| Bucket | Kind | Backend | Config | Status | Remaining | {% if redis_available %}Redis State | {% endif %}PG State | Updated | {% if allow_reset %}Actions | {% endif %}
|---|---|---|---|---|---|---|---|---|---|
| {{ b.bucket_name }} | {{ b.kind.replace("sliding_window_", "sw/") | replace("token_bucket", "tb") }} | {{ b.backend }} | {{ b.config_summary }} | {% if ls.is_exhausted is defined %} {% if ls.is_exhausted %} exhausted {% elif ls.tokens_remaining is defined and ls.capacity is defined and ls.tokens_remaining < ls.capacity * 0.3 %} low {% else %} ok {% endif %} {% else %} — {% endif %} | {% if ls.remaining is defined and ls.remaining > 0 %} {{ ls.remaining | round(1) }} / {{ ls.limit or "—" }} req {% elif ls.tokens_remaining is defined %} {{ ls.tokens_remaining | round(1) }} / {{ ls.capacity or "—" }} tokens {% else %} — {% endif %} {% if ls.retry_after_seconds is defined and ls.retry_after_seconds > 0 %} (retry {{ ls.retry_after_seconds | round(1) }}s) {% endif %} | {% if redis_available %}{{ redis_state.get(b.bucket_name, {}) }} | {% endif %}{{ b.pg_state or "—" }} | {{ b.updated_at or "—" }} | {% if allow_reset %}{% endif %} |
No rate limit buckets registered.