google_cloud_run 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google_cloud_run/job_adapter.rb +1 -1
- data/lib/google_cloud_run/util.rb +2 -0
- data/lib/google_cloud_run/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64a3ccfb97299da2a54921e2a7969757fbc5190a242debed09e8de37fcd18b2b
|
4
|
+
data.tar.gz: 650147e25f7b01df2629fc9cc70a0e11fe37725fa3e6be7b42f4af763392dd57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7a40bc1511b1dd2b60b16ce14830cb0d2b65af031036629d496fcc3854b2d10e83b1e19c4e25d1225a8686ddd1a6387d70a4cff2a5b30c927fd87b764235265
|
7
|
+
data.tar.gz: a35e89f50bc6069ae82629fed6a1d334793a5e2c1f641d49264a2bfb93beeb4906395d582e179800182e71b453030c0826702c3d184151af58e5d64c82bc4a8d
|
data/README.md
CHANGED
@@ -75,7 +75,7 @@ In the default production config, the logger is wrapped around
|
|
75
75
|
a `ENV["RAILS_LOG_TO_STDOUT"].present?` block. I usually just
|
76
76
|
remove this block so I don't have to actually set this ENV var.
|
77
77
|
|
78
|
-
You can also remove `config.log_formatter` as we don't need it anymore.
|
78
|
+
You can also remove `config.log_formatter` and `config.log_tags` as we don't need it anymore.
|
79
79
|
|
80
80
|
I recommend logging `:g_notice` and higher. Rails logs a lot of noise when logging
|
81
81
|
`:info` and higher.
|
@@ -65,7 +65,7 @@ module ActiveJob
|
|
65
65
|
raise "Failed sending job #{job_name}(#{job_id}) to queue '#{region}/#{queue_name}'. Google didn't return a response."
|
66
66
|
end
|
67
67
|
|
68
|
-
Rails.logger&.
|
68
|
+
Rails.logger&.info "Job #{job_name}(#{job_id}) sent to queue '#{region}/#{queue_name}'"
|
69
69
|
end
|
70
70
|
|
71
71
|
def build_task_request(name, url, service_account_email, body, job_timeout, scheduled_at)
|
@@ -52,6 +52,7 @@ module GoogleCloudRun
|
|
52
52
|
# project_id returns the current Google project id from the
|
53
53
|
# metadata server
|
54
54
|
def self.project_id
|
55
|
+
return ENV["GOOGLE_PROJECT_ID"] unless ENV["GOOGLE_PROJECT_ID"].blank?
|
55
56
|
return "dummy-project" if Rails.env.test?
|
56
57
|
|
57
58
|
@project_id ||= begin
|
@@ -78,6 +79,7 @@ module GoogleCloudRun
|
|
78
79
|
# default_service_account_email returns the default service account's email from the
|
79
80
|
# metadata server
|
80
81
|
def self.default_service_account_email
|
82
|
+
return ENV["GOOGLE_SERVICE_ACCOUNT_EMAIL"] unless ENV["GOOGLE_SERVICE_ACCOUNT_EMAIL"].blank?
|
81
83
|
return "123456789-compute@developer.gserviceaccount.com" if Rails.env.test?
|
82
84
|
|
83
85
|
@default_service_account_email ||= begin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_cloud_run
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Kadenbach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|