|
|
|
@@ -26,7 +26,7 @@ func NewClientsManager() *ClientsManager { |
|
|
|
|
|
|
|
const MaxClients = 100 |
|
|
|
|
|
|
|
var LastActionsQueue = NewSyncQueue(11) |
|
|
|
var LastActionsQueue = NewSyncQueue(15) |
|
|
|
|
|
|
|
func (h *ClientsManager) Run() { |
|
|
|
initActionQueue() |
|
|
|
@@ -75,7 +75,15 @@ func initActionQueue() { |
|
|
|
actions, err := models.GetLast20PublicFeeds() |
|
|
|
if err == nil { |
|
|
|
for i := len(actions) - 1; i >= 0; i-- { |
|
|
|
LastActionsQueue.Push(actions[i]) |
|
|
|
|
|
|
|
user, err := models.GetUserByID(actions[i].UserID) |
|
|
|
if err == nil { |
|
|
|
if !user.IsOrganization() { |
|
|
|
LastActionsQueue.Push(actions[i]) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |