Skip to content

Instantly share code, notes, and snippets.

@plant99
Created January 17, 2023 09:14
Show Gist options
  • Save plant99/473f3f72c82a1224ff3e260dad8ff469 to your computer and use it in GitHub Desktop.
Save plant99/473f3f72c82a1224ff3e260dad8ff469 to your computer and use it in GitHub Desktop.
diff for MM-47137
diff --git a/app/security_update_check.go b/app/security_update_check.go
index b20d9268e..dbd76d6c9 100644
--- a/app/security_update_check.go
+++ b/app/security_update_check.go
@@ -5,6 +5,7 @@ package app
import (
"encoding/json"
+ "fmt"
"io"
"net/http"
"net/url"
@@ -19,7 +20,7 @@ import (
const (
PropSecurityURL = "https://securityupdatecheck.mattermost.com"
- SecurityUpdatePeriod = 86400000 // 24 hours in milliseconds.
+ SecurityUpdatePeriod = 10000 // 24 hours in milliseconds.
PropSecurityID = "id"
PropSecurityBuild = "b"
@@ -74,6 +75,7 @@ func (s *Server) DoSecurityUpdateCheck() {
}
if ucr, err := s.Store().Status().GetTotalActiveUsersCount(); err == nil {
+ fmt.Println(strconv.FormatInt(ucr, 10), "printing ucr")
v.Set(PropSecurityActiveUserCount, strconv.FormatInt(ucr, 10))
}
diff --git a/app/server.go b/app/server.go
index 69eb4d057..90f484e70 100644
--- a/app/server.go
+++ b/app/server.go
@@ -1139,7 +1139,7 @@ func runSecurityJob(s *Server) {
doSecurity(s)
model.CreateRecurringTask("Security", func() {
doSecurity(s)
- }, time.Hour*4)
+ }, time.Second*20)
}
func runTokenCleanupJob(s *Server) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment