Skip to content

Commit

Permalink
Web server: allow detecting restart through timestamp instead of repo…
Browse files Browse the repository at this point in the history
… version

Allows detecting a restart if repo was not changed.
  • Loading branch information
FooBarWidget committed Aug 8, 2024
1 parent 1f79de6 commit add32c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ansible/files/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ apt.{$DOMAIN_NAME} {
}
}
encode gzip
handle /admin/repo_query_time {
respond "{$REPO_QUERY_TIME}"
}
handle /admin/* {
reverse_proxy unix//run/apiserver/server.sock
}
handle /latest_version {
respond "{$APT_LATEST_VERSION}"
}
handle {
redir https://storage.googleapis.com/{$GCLOUD_BUCKET_PREFIX}-server-edition-apt-repo/versions/{$APT_LATEST_VERSION}/public{uri}
}
Expand All @@ -38,12 +38,12 @@ yum.{$DOMAIN_NAME} {
}
}
encode gzip
handle /admin/repo_query_time {
respond "{$REPO_QUERY_TIME}"
}
handle /admin/* {
reverse_proxy unix//run/apiserver/server.sock
}
handle /latest_version {
respond "{$YUM_LATEST_VERSION}"
}
handle {
redir https://storage.googleapis.com/{$GCLOUD_BUCKET_PREFIX}-server-edition-yum-repo/versions/{$YUM_LATEST_VERSION}/public{uri}
}
Expand Down
1 change: 1 addition & 0 deletions ansible/files/query-latest-repo-versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def main
open_io(ARGV[0]) do |io|
query_repo_version('apt', io)
query_repo_version('yum', io)
io.puts "REPO_QUERY_TIME=#{Time.now.to_f}"
end
end

Expand Down

0 comments on commit add32c0

Please sign in to comment.