mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-13 20:42:39 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6da6ee9ab | ||
|
|
8802d24789 |
@@ -1,4 +1,12 @@
|
||||
|
||||
## 2025.9.26 (2025/09/30)
|
||||
|
||||
### Debug
|
||||
|
||||
- Log different sets of GoCardless rate limits. ([8802d247](https://github.com/elisiariocouto/leggen/commit/8802d24789cbb8e854d857a0d7cc89a25a26f378))
|
||||
|
||||
|
||||
|
||||
## 2025.9.25 (2025/09/30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -11,17 +11,18 @@ from leggen.utils.paths import path_manager
|
||||
|
||||
def _log_rate_limits(response, method, url):
|
||||
"""Log GoCardless API rate limit headers"""
|
||||
limit = response.headers.get("http_x_ratelimit_limit") or response.headers.get(
|
||||
"http_x_ratelimit_account_success_limit"
|
||||
)
|
||||
remaining = response.headers.get(
|
||||
"http_x_ratelimit_remaining"
|
||||
) or response.headers.get("http_x_ratelimit_account_success_remaining")
|
||||
reset = response.headers.get("http_x_ratelimit_reset") or response.headers.get(
|
||||
"http_x_ratelimit_account_success_reset"
|
||||
limit = response.headers.get("http_x_ratelimit_limit")
|
||||
remaining = response.headers.get("http_x_ratelimit_remaining")
|
||||
reset = response.headers.get("http_x_ratelimit_reset")
|
||||
|
||||
account_limit = response.headers.get("http_x_ratelimit_account_success_limit")
|
||||
account_remaining = response.headers.get(
|
||||
"http_x_ratelimit_account_success_remaining"
|
||||
)
|
||||
account_reset = response.headers.get("http_x_ratelimit_account_success_reset")
|
||||
|
||||
logger.debug(
|
||||
f"{method} {url} - Limit: {limit}, Remaining: {remaining}, Reset: {reset}s"
|
||||
f"{method} {url} Limit/Remaining/Reset (Global: {limit}/{remaining}/{reset}s) (Account: {account_limit}/{account_remaining}/{account_reset}s)"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "leggen"
|
||||
version = "2025.9.25"
|
||||
version = "2025.9.26"
|
||||
description = "An Open Banking CLI"
|
||||
authors = [{ name = "Elisiário Couto", email = "elisiario@couto.io" }]
|
||||
requires-python = "~=3.13.0"
|
||||
|
||||
Reference in New Issue
Block a user