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:
2026-03-26 00:33:45 +07:00
parent dfd999e058
commit bb7f7b0bb3
19 changed files with 270 additions and 329 deletions

View File

@@ -194,7 +194,7 @@ func (a *Authenticator) maybeCreateSubscriptionReminderPostAuth(ctx context.Cont
sentAt := now
notification := &model.Notification{
ID: uuidString(),
ID: uuid.New().String(),
UserID: user.ID,
Type: "billing.subscription_expiring",
Title: "Plan expiring soon",
@@ -272,7 +272,3 @@ func mustMarshalAuthJSON(value any) string {
}
return string(encoded)
}
func uuidString() string {
return uuid.New().String()
}