Only update GithubRepos once in RepoSyncWorker (#14175)
Touching the GithubRepo invokes GithubRepo#clear_caches, so calling `update` and then `touch` calls `clear_caches` *twice*. This pulls it back to calling it once.
This commit is contained in:
parent
6a93ad914a
commit
8b79eb8698
1 changed files with 3 additions and 1 deletions
|
|
@ -27,8 +27,10 @@ module GithubRepos
|
|||
watchers_count: fetched_repo.watchers,
|
||||
stargazers_count: fetched_repo.stargazers_count,
|
||||
info_hash: fetched_repo.to_hash,
|
||||
# Touch `updated_at` even if nothing here was updated. See PR #12853
|
||||
# for more details.
|
||||
updated_at: Time.current,
|
||||
)
|
||||
repo.touch(:updated_at)
|
||||
if repo.user&.github_repos_updated_at&.before?(TOUCH_USER_COOLDOWN.ago)
|
||||
repo.user.touch(:github_repos_updated_at)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue