Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-01-10 17:23:22 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-01-10 17:23:22 +0300
commitcf6258af41cee0638665560509c87bb49135081d (patch)
tree87f1c1f9ba9ad57573eb6805ae5e98fbc4552939 /app/services
parentb44583e9c6a00c689be398fee54b24a6dab019a6 (diff)
Fix billing checking
Diffstat (limited to 'app/services')
-rw-r--r--app/services/check_gcp_project_billing_service.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/check_gcp_project_billing_service.rb b/app/services/check_gcp_project_billing_service.rb
index 854adf2177d..ea82b61b279 100644
--- a/app/services/check_gcp_project_billing_service.rb
+++ b/app/services/check_gcp_project_billing_service.rb
@@ -2,7 +2,10 @@ class CheckGcpProjectBillingService
def execute(token)
client = GoogleApi::CloudPlatform::Client.new(token, nil)
client.projects_list.select do |project|
- client.projects_get_billing_info(project.name).billingEnabled
+ begin
+ client.projects_get_billing_info(project.project_id).billing_enabled
+ rescue
+ end
end
end
end