Created by: oblivisheee
This pull request includes several changes to improve the subscription service, including updates to configuration files, Docker setup, and error handling. The most important changes are grouped by theme below:
Configuration and Setup:
- Removed the
users-docker-config.jsonfile and updateddocker-compose.yamlto remove the volume mount for this file. Added a newsubscriptionservice with its configuration. [1] [2] - Added a new network
nginxtodocker-compose.yamlfor better network isolation. [1] [2] - Updated the
nginx.confto include new locations for subscription-related routes.
Dependency Management:
- Added new dependencies
bytesandredistosubscription/Cargo.tomlfor handling Redis operations.
Error Handling:
- Enhanced the
Errorenum insubscription/src/errors.rsto include new variants for Redis and NATS errors. Added corresponding methods to handle these errors. [1] [2] [3] [4]
Redis Integration:
- Updated various functions in
subscription/sql/funcs_plans.surqlandsubscription/sql/funcs_subs.surqlto include type annotations for parameters. [1] [2] [3] [4] - Integrated Redis caching in
subscription/src/interfaces.rsto cache subscription plans and invalidate the cache on updates. [1] [2] [3]