We allow 10GB of free cache storage per repository, a limit we've set in line with the official GitHub Actions cache. However, some customers may need more than 10GB of cache storage. This PR enables us to assign a custom cache storage quota to all repositories within a project, though the quota still applies on a per-repository basis.
15 lines
349 B
Ruby
15 lines
349 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../model"
|
|
|
|
class ProjectQuota < Sequel::Model
|
|
@@default_quotas = nil
|
|
def self.default_quotas
|
|
@@default_quotas ||= YAML.load_file("config/default_quotas.yml").each_with_object({}) do |item, hash|
|
|
hash[item["resource_type"]] = item
|
|
end
|
|
end
|
|
end
|
|
|
|
ProjectQuota.unrestrict_primary_key
|