feat: enhance job and user models with additional fields
- Added VideoID, UserID, and TimeLimit fields to the job model. - Removed unused referral fields from the user model. - Updated job creation and update logic to handle new fields. - Refactored job service to work with updated job model. - Replaced cache interface with Redis adapter in service layer. - Introduced a Dead Letter Queue (DLQ) for failed jobs in Redis. - Updated gRPC server to accommodate changes in job handling. - Removed obsolete cache package and related files.
This commit is contained in:
@@ -10,10 +10,8 @@ type Config struct {
|
||||
Server ServerConfig
|
||||
Database DatabaseConfig
|
||||
Redis RedisConfig
|
||||
JWT JWTConfig
|
||||
Google GoogleConfig
|
||||
Frontend FrontendConfig
|
||||
CORS CORSConfig
|
||||
Email EmailConfig
|
||||
AWS AWSConfig
|
||||
Render RenderConfig
|
||||
@@ -48,10 +46,6 @@ type RedisConfig struct {
|
||||
DB int
|
||||
}
|
||||
|
||||
type JWTConfig struct {
|
||||
Secret string
|
||||
}
|
||||
|
||||
type GoogleConfig struct {
|
||||
ClientID string `mapstructure:"client_id"`
|
||||
ClientSecret string `mapstructure:"client_secret"`
|
||||
@@ -64,10 +58,6 @@ type FrontendConfig struct {
|
||||
GoogleAuthFinalizePath string `mapstructure:"google_auth_finalize_path"`
|
||||
}
|
||||
|
||||
type CORSConfig struct {
|
||||
AllowOrigins []string `mapstructure:"allow_origins"`
|
||||
}
|
||||
|
||||
type EmailConfig struct {
|
||||
From string
|
||||
// Add SMTP settings here later
|
||||
@@ -86,7 +76,6 @@ func LoadConfig() (*Config, error) {
|
||||
v := viper.New()
|
||||
|
||||
// Set defaults
|
||||
v.SetDefault("server.port", "8080")
|
||||
v.SetDefault("server.grpc_port", "9000")
|
||||
v.SetDefault("server.mode", "debug")
|
||||
v.SetDefault("redis.db", 0)
|
||||
@@ -96,7 +85,6 @@ func LoadConfig() (*Config, error) {
|
||||
v.SetDefault("google.state_ttl_minutes", 10)
|
||||
v.SetDefault("frontend.google_auth_finalize_path", "/auth/google/finalize")
|
||||
v.SetDefault("internal.marker", "")
|
||||
v.SetDefault("cors.allow_origins", []string{"http://localhost:5173", "http://localhost:8080", "http://localhost:8081"})
|
||||
|
||||
// Environment variable settings
|
||||
v.SetEnvPrefix("APP")
|
||||
|
||||
Reference in New Issue
Block a user