refactor: cache index

This commit is contained in:
Jacky 2025-04-04 02:00:18 +00:00
parent 5d8d96fd4f
commit 269397e114
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
20 changed files with 532 additions and 364 deletions

View file

@ -15,10 +15,10 @@ func GetNginxLogsLive(c *gin.Context) {
notify := c.Writer.CloseNotify()
// Subscribe to scanner status changes
statusChan := cache.SubscribeStatusChanges()
statusChan := cache.SubscribeScanningStatus()
// Ensure we unsubscribe when the handler exits
defer cache.UnsubscribeStatusChanges(statusChan)
defer cache.UnsubscribeScanningStatus(statusChan)
// Main event loop
for {