20 Commits

Author SHA1 Message Date
zurdi
53f9386208
refactor: enhance logging messages and formatting for improved clarity and consistency 2025-05-08 23:35:33 +00:00
zurdi
d5bb63c06f
refactor: improve logging in redis_handler and init scripts for better debugging and process management 2025-05-08 16:34:23 +00:00
Michael Manganiello
b81fbc5820
fix: Improve handling of Redis URL
This change replaces the creation of Redis URL, from a simple string
interpolation, to using `yarl.URL`. The main benefit, besides not
forgetting to set all five different variables on every Redis client
initialization, is that user credentials are correctly URL-encoded, if
present.

Up until now, if a password had special characters, it could break the
generated URL.

This change also introduces support for a `REDIS_SSL` setting, which
allows the user to specify if the Redis connection should use SSL or not.
2024-10-11 21:41:19 -03:00
Georges-Antoine Assi
8dae0a503c
add simple emojis to cards 2024-09-08 13:59:10 -04:00
Michael Manganiello
749e4d65c1
misc: Use PYTEST_VERSION variable to detect Pytest runs
Pytest v8.2 introduced the `PYTEST_VERSION` environment variable [1],
that can be used to check if code is running from within a pytest run.

This way, we can avoid checking the loaded `sys` modules.

[1] https://docs.pytest.org/en/stable/changelog.html#id57
2024-07-27 12:03:44 -03:00
Michael Manganiello
6eb8e6aeff
misc: Add Redis async cache
Introduce an asynchronous Redis instance to be used in async functions.
Also, this change migrates most of the sync cache usage to the new async
cache.
2024-07-21 18:23:19 -03:00
Georges-Antoine Assi
92d5c60f43 run trunk fmt 2024-06-23 15:09:55 +00:00
Michael Manganiello
ed635d69cc misc: Move fakeredis to test dependencies
`fakeredis` is only needed when running tests, so we can move it to the
`test` dependency group.
2024-06-23 11:10:25 -03:00
Georges-Antoine Assi
a7cf0d389a
run trunk format on all files 2024-05-21 10:18:13 -04:00
Georges-Antoine Assi
880345f20c
ruff-only pre-commit 2024-05-18 12:05:57 -04:00
HellLord
98f60fb001
adds more configuration for external redis
add env vars: REDIS_USERNAME, REDIS_DB

Co-Authored-By: Zurdi <34356590+zurdi15@users.noreply.github.com>
Co-Authored-By: Georges-Antoine Assi <3247106+gantoine@users.noreply.github.com>
2024-04-14 22:01:31 +06:00
Georges-Antoine Assi
fd196165b8
add fake redis for tests 2024-03-26 20:37:38 -04:00
Georges-Antoine Assi
4415884608
add fallback cache entries for hget and hset 2024-03-26 19:51:26 -04:00
Georges-Antoine Assi
41d0d2eb46 more dir creating up in dockerfile + add redis password 2024-03-25 15:30:27 +00:00
Georges-Antoine Assi
a36d49979e
[WIP] build redis into container
expose port right
2024-03-01 10:36:02 -05:00
Georges-Antoine Assi
1c8b86c664
More cleanup of docker-compose 2024-03-01 09:59:02 -05:00
Georges-Antoine Assi
bf48b9037f
simplify example compose 2024-02-02 00:03:30 -05:00
Georges-Antoine Assi
6bcadec702
everything we need for 3.0 2024-02-01 18:13:16 -05:00
Zurdi
0fe8bf6a74 redis scan fixed 2024-01-17 01:47:22 +01:00
Zurdi
4b9e76f550 backend structure refactor 2024-01-12 23:44:27 +01:00