(c *gin.Context)
| 44 | } |
| 45 | |
| 46 | func queueStatus(c *gin.Context) { |
| 47 | qs := make([]gin.H, 0) |
| 48 | controller.eventQueuesMutex.RLock() |
| 49 | defer controller.eventQueuesMutex.RUnlock() |
| 50 | for _, product := range mydb.GetProducts() { |
| 51 | if queue, ok := controller.eventQueues[product.ID]; ok { |
| 52 | qs = append(qs, gin.H{"id": product.ID, "name": product.Name, "count": queue.len(), "mute": queue.mute}) |
| 53 | } |
| 54 | } |
| 55 | c.JSON(http.StatusOK, gin.H{"queues": qs}) |
| 56 | } |
| 57 | |
| 58 | func queueClean(c *gin.Context) { |
| 59 | id := c.Param("id") |
nothing calls this directly
no test coverage detected