mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 02:45:49 +02:00
refactor: cache index
This commit is contained in:
parent
5d8d96fd4f
commit
269397e114
20 changed files with 532 additions and 364 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue