Skip to content
This repository was archived by the owner on Jul 27, 2025. It is now read-only.

Commit 4866a4f

Browse files
committed
Increase cache time for upgrades
Fixes #1525
1 parent 027c182 commit 4866a4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/models/provider/github.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def initialize(config = {})
88
end
99

1010
def fetch_latest_upgrade_candidates
11-
Rails.cache.fetch("latest_github_upgrade_candidates", expires_in: 2.minutes) do
11+
Rails.cache.fetch("latest_github_upgrade_candidates", expires_in: 30.minutes) do
1212
Rails.logger.info "Fetching latest GitHub upgrade candidates from #{repo} on branch #{branch}..."
1313
begin
1414
latest_release = Octokit.releases(repo).first

config/initializers/good_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
if ENV["UPGRADES_ENABLED"] == "true"
55
config.good_job.cron = {
66
auto_upgrade: {
7-
cron: "every 30 seconds",
7+
cron: "every 2 minutes",
88
class: "AutoUpgradeJob",
99
description: "Check for new versions of the app and upgrade if necessary"
1010
}

0 commit comments

Comments
 (0)