souls 1.4.12 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3469889eb53b99c477008678edde936ac8b0eb2d706c8e9558f952fe909d6777
|
4
|
+
data.tar.gz: 1c7b81422aa93ab37bfca70caf243ec02f3946bbc7c656d6a934835400d79fed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32c16bd091866026827fec6c897622baa598197ebc89088f7ef6d0b3491532cd2d0dff775d6cd67671eae1b72fdf9e8d6dd0fbaab22270cef1c7c6ac3784d556
|
7
|
+
data.tar.gz: 2afe09c0a90271def102750e8b20d4b6bc894627c48738418fb580516ef5b8bdcef165e6e42d3d3b550c2f5786f64603f1da5cd2b9308bdb9d0a0b55ef0f3834
|
@@ -23,7 +23,7 @@ module Souls
|
|
23
23
|
desc "get_endpoint", "Show Worker's Endpoint"
|
24
24
|
def get_endpoint(worker_name: "")
|
25
25
|
project_id = Souls.configuration.project_id
|
26
|
-
`gcloud run services list --project #{project_id} | grep #{worker_name} | awk '{print $4}'`
|
26
|
+
`gcloud run services list --project #{project_id} | grep -x #{worker_name} | awk '{print $4}'`
|
27
27
|
rescue Thor::Error => e
|
28
28
|
raise(Thor::Error, e)
|
29
29
|
end
|
@@ -18,11 +18,13 @@ module Souls
|
|
18
18
|
--database-version=#{db_type} --cpu=1 --memory=4096MB --zone=#{zone} \
|
19
19
|
--root-password='#{password}' --database-flags cloudsql.iam_authentication=on"
|
20
20
|
)
|
21
|
+
instance_ip = `gcloud sql instances list | grep -x #{instance_name} | awk '{print $5}'`.strip
|
22
|
+
sleep(5) until instance_ip.match?(Resolv::IPv4::Regex)
|
21
23
|
Dir.chdir(Souls.get_api_path.to_s) do
|
22
24
|
file_path = ".env"
|
23
25
|
File.open(file_path, "w") do |line|
|
24
26
|
line.write(<<~TEXT)
|
25
|
-
SOULS_DB_HOST=#{
|
27
|
+
SOULS_DB_HOST=#{instance_ip}
|
26
28
|
SOULS_DB_PW=#{password}
|
27
29
|
SOULS_DB_USER=postgres
|
28
30
|
SOULS_GCP_PROJECT_ID=#{project_id}
|
@@ -36,7 +38,7 @@ module Souls
|
|
36
38
|
File.open(file_path, "w") do |line|
|
37
39
|
line.write(<<~TEXT)
|
38
40
|
SOULS_DB_HOST="/cloudsql/#{project_id}:#{region}:#{instance_name}"
|
39
|
-
SOULS_DB_PW=#{
|
41
|
+
SOULS_DB_PW=#{password}
|
40
42
|
SOULS_DB_USER=postgres
|
41
43
|
SOULS_APP_NAME=#{app_name}
|
42
44
|
SOULS_GCP_PROJECT_ID=#{project_id}
|
@@ -133,10 +135,6 @@ module Souls
|
|
133
135
|
|
134
136
|
private
|
135
137
|
|
136
|
-
def get_sql_ip
|
137
|
-
`gcloud sql instances list | grep james | awk '{print $5}'`
|
138
|
-
end
|
139
|
-
|
140
138
|
def region_to_timezone(region: "asia-northeast1")
|
141
139
|
if region.include?("asia")
|
142
140
|
"Asia/Tokyo"
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
data/lib/souls.rb
CHANGED