1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-21 22:29:38 +02:00

Increase cache time for upgrades
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

Fixes #1525
This commit is contained in:
Zach Gollwitzer 2024-12-12 15:14:54 -05:00
parent 027c18297b
commit 4866a4f8e4
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ class Provider::Github
end end
def fetch_latest_upgrade_candidates 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}..." Rails.logger.info "Fetching latest GitHub upgrade candidates from #{repo} on branch #{branch}..."
begin begin
latest_release = Octokit.releases(repo).first latest_release = Octokit.releases(repo).first

View file

@ -4,7 +4,7 @@ Rails.application.configure do
if ENV["UPGRADES_ENABLED"] == "true" if ENV["UPGRADES_ENABLED"] == "true"
config.good_job.cron = { config.good_job.cron = {
auto_upgrade: { auto_upgrade: {
cron: "every 30 seconds", cron: "every 2 minutes",
class: "AutoUpgradeJob", class: "AutoUpgradeJob",
description: "Check for new versions of the app and upgrade if necessary" description: "Check for new versions of the app and upgrade if necessary"
} }