Increase rate limits to 180 req/min for polling endpoints

This commit is contained in:
glenneth 2026-01-18 18:51:26 +03:00
parent 4622ae2440
commit 3b9232bf06
1 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,7 @@
(:listeners . ,total-listeners) (:listeners . ,total-listeners)
(:track-id . ,(find-track-by-title title)))))))) (:track-id . ,(find-track-by-title title))))))))
(define-api-with-limit asteroid/partial/now-playing (&optional mount) (:limit 60 :timeout 60) (define-api-with-limit asteroid/partial/now-playing (&optional mount) (:limit 180 :timeout 60)
"Get Partial HTML with live status from Icecast server. "Get Partial HTML with live status from Icecast server.
Optional MOUNT parameter specifies which stream to get metadata from. Optional MOUNT parameter specifies which stream to get metadata from.
Always polls both streams to keep recently played lists updated." Always polls both streams to keep recently played lists updated."
@ -121,7 +121,7 @@
:connection-error t :connection-error t
:stats nil)))))) :stats nil))))))
(define-api-with-limit asteroid/partial/now-playing-inline (&optional mount) (:limit 60 :timeout 60) (define-api-with-limit asteroid/partial/now-playing-inline (&optional mount) (:limit 180 :timeout 60)
"Get inline text with now playing info (for admin dashboard and widgets). "Get inline text with now playing info (for admin dashboard and widgets).
Optional MOUNT parameter specifies which stream to get metadata from." Optional MOUNT parameter specifies which stream to get metadata from."
(with-error-handling (with-error-handling
@ -135,7 +135,7 @@
(setf (header "Content-Type") "text/plain") (setf (header "Content-Type") "text/plain")
"Stream Offline"))))) "Stream Offline")))))
(define-api-with-limit asteroid/partial/now-playing-json (&optional mount) (:limit 60 :timeout 60) (define-api-with-limit asteroid/partial/now-playing-json (&optional mount) (:limit 180 :timeout 60)
"Get JSON with now playing info including track ID for favorites. "Get JSON with now playing info including track ID for favorites.
Optional MOUNT parameter specifies which stream to get metadata from." Optional MOUNT parameter specifies which stream to get metadata from."
;; Register web listener for geo stats (keeps listener active during playback) ;; Register web listener for geo stats (keeps listener active during playback)
@ -160,7 +160,7 @@
("title" . "Stream Offline") ("title" . "Stream Offline")
("track_id" . nil))))))) ("track_id" . nil)))))))
(define-api-with-limit asteroid/channel-name () (:limit 60 :timeout 60) (define-api-with-limit asteroid/channel-name () (:limit 180 :timeout 60)
"Get the current curated channel name for live updates. "Get the current curated channel name for live updates.
Returns JSON with the channel name from the current playlist's PHASE header." Returns JSON with the channel name from the current playlist's PHASE header."
(with-error-handling (with-error-handling