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.json
file and updateddocker-compose.yaml
to remove the volume mount for this file. Added a newsubscription
service with its configuration. [1] [2] - Added a new network
nginx
todocker-compose.yaml
for better network isolation. [1] [2] - Updated the
nginx.conf
to include new locations for subscription-related routes.
Dependency Management:
- Added new dependencies
bytes
andredis
tosubscription/Cargo.toml
for handling Redis operations.
Error Handling:
- Enhanced the
Error
enum insubscription/src/errors.rs
to 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.surql
andsubscription/sql/funcs_subs.surql
to include type annotations for parameters. [1] [2] [3] [4] - Integrated Redis caching in
subscription/src/interfaces.rs
to cache subscription plans and invalidate the cache on updates. [1] [2] [3]