Skip to content

Commit

Permalink
chore_: up re-evaluation interval to 8 hours to avoid Alchemy limit (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jrainville authored May 24, 2024
1 parent 4f493a5 commit cc505d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions protocol/communities/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const maxArchiveSizeInBytes = 30000000
var maxNbMembers = 5000
var maxNbPendingRequestedMembers = 100

var memberPermissionsCheckInterval = 1 * time.Hour
var memberPermissionsCheckInterval = 8 * time.Hour
var validateInterval = 2 * time.Minute

// Used for testing only
Expand Down Expand Up @@ -1406,8 +1406,8 @@ func (m *Manager) reevaluateMembersLoop(communityID types.HexBytes, reevaluateOn
task.mutex.Lock()
defer task.mutex.Unlock()

// Ensure reevaluation is performed not more often than once per minute
if !force && task.lastSuccessTime.After(time.Now().Add(-1*time.Minute)) {
// Ensure reevaluation is performed not more often than once per 5 minutes
if !force && task.lastSuccessTime.After(time.Now().Add(-5*time.Minute)) {
return false
}

Expand Down

0 comments on commit cc505d3

Please sign in to comment.