Skip to content

Commit

Permalink
limit update rate
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Nov 16, 2020
1 parent f95000d commit 9168e82
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Service/MembersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,10 @@ public function updateCachedFromCircle(Circle $circle) {
);

foreach ($members as $member) {
$this->updateCachedName($member, false);
$this->membersRequest->updateMemberInfo($member);
if (time() - $member->getCachedUpdate() > 72000) {
$this->updateCachedName($member, false);
$this->membersRequest->updateMemberInfo($member);
}
}
}

Expand Down

0 comments on commit 9168e82

Please sign in to comment.