Skip to content

Commit

Permalink
Increase cache time for upgrades
Browse files Browse the repository at this point in the history
Fixes #1525
  • Loading branch information
zachgoll committed Dec 12, 2024
1 parent 027c182 commit 4866a4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/provider/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(config = {})
end

def 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) do
Rails.logger.info "Fetching latest GitHub upgrade candidates from #{repo} on branch #{branch}..."
begin
latest_release = Octokit.releases(repo).first
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/good_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
if 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"
}
Expand Down

0 comments on commit 4866a4f

Please sign in to comment.