(admit-sql org-id rate-key bucket-ms window-start limit)A single atomic statement that checks the rate limit and UPSERTs if allowed. Returns 1 updated row if admitted, or 0 if rejected by the WHERE clause.
A single atomic statement that checks the rate limit and UPSERTs if allowed. Returns 1 updated row if admitted, or 0 if rejected by the WHERE clause.
(make-quota-limiter
{:keys [db-name db-dir limit prune-every batch-size profile-key]
:or {batch-size 500 profile-key :write-intensive prune-every 1000}})Creates a SQLite-backed quota limiter.
Initializes the database and runs migrations.
config map requires:
Creates a SQLite-backed quota limiter. Initializes the database and runs migrations. `config` map requires: - :db-dir - :db-name - :limit (number of requests per hour) - :prune-every (approximate number of requests before running a background prune, e.g. 1000)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |