mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 21:23:43 +08:00
972db687fe
Why this change? We currently support `GlobalSetting.refresh_maxmind_db_during_precompile_days` which should cache the maxmind databases on disk for the configured number of days before it downloads the databases from maxmind again via the API. This was previously added to help us avoid hitting the API rate limit from maxmind. However, there was a bug in the `copy_maxmind` when we copied the latest downloaded database to the cache directory. In particular, `FileUtils.cp` was called with `preserve: true` which would preserve the modified time of the file being copied. This is problematic because download the database from maxmind on 2 April 2024 can give us a file with an mtime of 29 March 2024. If `GlobalSetting.refresh_maxmind_db_during_precompile_days` is set to `2` for example, the cache will never be used since we will think that the file has been downloaded for more than 2 days in our checks. What is the fix here? While we want to preserve the owner and group of the file, we do not want to preserve the modified time and hence we will call `FileUtils.touch` when copying the file. |
||
---|---|---|
.. | ||
add_topic_to_quotes.rake | ||
admin.rake | ||
annotate.rake | ||
api.rake | ||
assets.rake | ||
auto_annotate_models.rake | ||
autospec.rake | ||
avatars.rake | ||
backfill.thor | ||
categories.rake | ||
cdn.rake | ||
compatibility.rake | ||
db.rake | ||
destroy.rake | ||
dev.rake | ||
docker.rake | ||
documentation.rake | ||
emails.rake | ||
emoji.rake | ||
export.rake | ||
groups.rake | ||
hashtags.rake | ||
i18n.rake | ||
images.rake | ||
import.rake | ||
incoming_emails.rake | ||
integration.rake | ||
javascript.rake | ||
log.rake | ||
maxminddb.rake | ||
plugin.rake | ||
populate.rake | ||
populate.thor | ||
posts.rake | ||
profile.rake | ||
qunit.rake | ||
redis.rake | ||
release_note.rake | ||
revisions.rake | ||
rspec.rake | ||
s3.rake | ||
scheduler.rake | ||
search.rake | ||
site_settings.rake | ||
site.rake | ||
smoke_test.rake | ||
svg_icons.rake | ||
svg_sprites.rake | ||
tags.rake | ||
themes.rake | ||
topics.rake | ||
turbo.rake | ||
typepad.thor | ||
uploads.rake | ||
users.rake | ||
version_bump.rake |