The personal finance app for everyone
Increase cache time for upgrades
Zach Gollwitzer4866a4f8e491
diff --git a/app/models/provider/github.rb b/app/models/provider/github.rbindex 5aa8526a..51e2556c 100644--- a/app/models/provider/github.rb+++ b/app/models/provider/github.rb@@ -8,7 +8,7 @@ class Provider::Githubenddef fetch_latest_upgrade_candidates- Rails.cache.fetch("latest_github_upgrade_candidates", expires_in: 2.minutes) do+ Rails.cache.fetch("latest_github_upgrade_candidates", expires_in: 30.minutes) doRails.logger.info "Fetching latest GitHub upgrade candidates from #{repo} on branch #{branch}..."beginlatest_release = Octokit.releases(repo).firstdiff --git a/config/initializers/good_job.rb b/config/initializers/good_job.rbindex 5d8aae25..9ca92c0f 100644--- a/config/initializers/good_job.rb+++ b/config/initializers/good_job.rb@@ -4,7 +4,7 @@ Rails.application.configure doif ENV["UPGRADES_ENABLED"] == "true"config.good_job.cron = {auto_upgrade: {- cron: "every 30 seconds",+ cron: "every 2 minutes",class: "AutoUpgradeJob",description: "Check for new versions of the app and upgrade if necessary"}