mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
refactor(service): remove legacy routing and unused code
Removes the legacy route table maintenance logic from the sync service that populated deprecated Redis keys. Additionally, deletes the unused TokenService and KeyDTO files to reduce technical debt.
This commit is contained in:
@@ -366,21 +366,6 @@ func (s *SyncService) writeProvidersSnapshot(ctx context.Context, pipe redis.Pip
|
||||
return fmt.Errorf("marshal provider %d: %w", k.ID, err)
|
||||
}
|
||||
pipe.HSet(ctx, "config:providers", fmt.Sprintf("%d", k.ID), payload)
|
||||
|
||||
// Legacy route table maintenance for compatibility.
|
||||
for _, m := range models {
|
||||
if m == "" {
|
||||
continue
|
||||
}
|
||||
if snap.Status != "active" {
|
||||
continue
|
||||
}
|
||||
if snap.BanUntil > 0 && time.Now().Unix() < snap.BanUntil {
|
||||
continue
|
||||
}
|
||||
routeKey := fmt.Sprintf("route:group:%s:%s", groupName, m)
|
||||
pipe.SAdd(ctx, routeKey, k.ID)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user