souls 1.21.4 → 1.21.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/souls/cli/create/index.rb +11 -7
- data/lib/souls/cli/gcloud/run/index.rb +3 -3
- data/lib/souls/cli/gcloud/scheduler/index.rb +14 -5
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +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: 2d5989b972bb93949215156aac0d1d35110eeb998419ded0cf31c1b4872ef06a
|
4
|
+
data.tar.gz: 5c81810f878ce4aabb7bc155ed1c4dfce05ca787ad47d45449440d3ca111b03b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8e76007b148e35453bff8d0d16309f3b50f39c8b307bb7bb17fc717ca4a74eba870b0d83b86800c73091516234996546d65ff4978a3739cb6b774b8d6df7e7c
|
7
|
+
data.tar.gz: 14912f26822268f96d53a97e9fc916ddfc3c98501ac47044598fcf1f3158657f4e8f8a8d922ca76bcf8d632a412d575cae3ccd1f7dc5cc66fdb4d704c7377bc0
|
@@ -141,28 +141,31 @@ end
|
|
141
141
|
- name: Set up Ruby 3.1
|
142
142
|
uses: ruby/setup-ruby@v1
|
143
143
|
with:
|
144
|
+
bundler-cache: true
|
144
145
|
ruby-version: 3.1
|
145
146
|
|
146
147
|
- name: Checkout the repository
|
147
148
|
uses: actions/checkout@v2
|
148
149
|
|
149
|
-
-
|
150
|
-
uses: google-github-actions/
|
150
|
+
- id: auth
|
151
|
+
uses: google-github-actions/auth@v0
|
151
152
|
with:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
153
|
+
credentials_json: ${{ secrets.SOULS_GCP_SA_KEY }}
|
154
|
+
|
155
|
+
- name: Set up Cloud SDK
|
156
|
+
uses: google-github-actions/setup-gcloud@v0
|
156
157
|
|
157
158
|
- name: Build and test with Rake
|
158
159
|
env:
|
159
160
|
PGHOST: 127.0.0.1
|
160
161
|
PGUSER: postgres
|
161
162
|
RACK_ENV: test
|
163
|
+
RUBY_YJIT_ENABLE: 1
|
162
164
|
SOULS_GCP_PROJECT_ID: ${{ secrets.SOULS_GCP_PROJECT_ID }}
|
163
165
|
run: |
|
164
166
|
sudo apt-get -yqq install libpq-dev
|
165
167
|
cd apps/#{worker_name}
|
168
|
+
rm -f .env
|
166
169
|
gem install bundler
|
167
170
|
bundle install --jobs 4 --retry 3
|
168
171
|
bundle exec rake db:create RACK_ENV=test
|
@@ -202,7 +205,8 @@ end
|
|
202
205
|
--set-env-vars="SOULS_DB_HOST=${{ secrets.SOULS_DB_HOST }}" \\
|
203
206
|
--set-env-vars="TZ=${{ secrets.TZ }}" \\
|
204
207
|
--set-env-vars="SOULS_SECRET_KEY_BASE=${{ secrets.SOULS_SECRET_KEY_BASE }}" \\
|
205
|
-
--set-env-vars="SOULS_GCP_PROJECT_ID=${{ secrets.SOULS_GCP_PROJECT_ID }}"
|
208
|
+
--set-env-vars="SOULS_GCP_PROJECT_ID=${{ secrets.SOULS_GCP_PROJECT_ID }}" \\
|
209
|
+
--set-env-vars="RUBY_YJIT_ENABLE=1"
|
206
210
|
TEXT
|
207
211
|
end
|
208
212
|
SOULs::Painter.create_file(file_path.to_s)
|
@@ -5,9 +5,9 @@ module SOULs
|
|
5
5
|
system("gcloud run services list --platform managed")
|
6
6
|
end
|
7
7
|
|
8
|
-
desc "get_endpoint", "Show Worker's Endpoint"
|
9
|
-
def get_endpoint(
|
10
|
-
`gcloud run services list --platform managed | grep #{
|
8
|
+
desc "get_endpoint [service_name]", "Show Worker's Endpoint"
|
9
|
+
def get_endpoint(service_name)
|
10
|
+
`gcloud run services list --platform managed | grep #{service_name} | awk '{print $4}'`
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -1,11 +1,20 @@
|
|
1
1
|
module SOULs
|
2
2
|
class CloudScheduler < Thor
|
3
|
-
desc "awake [url]", "Set Ping
|
4
|
-
def awake
|
5
|
-
app_name = SOULs.configuration.app
|
3
|
+
desc "awake [url]", "Set Ping by Google Cloud Scheduler: Cron e.g. '0 10 * * *' or 'every 10 hours'"
|
4
|
+
def awake
|
5
|
+
app_name = SOULs.configuration.app.gsub("_", "-")
|
6
|
+
worker_names = SOULs.configuration.workers.map(&:name)
|
7
|
+
services = ["souls-#{app_name}-api"]
|
8
|
+
worker_names.each { |worker| services << "souls-#{app_name}-#{worker}" }
|
9
|
+
|
10
|
+
prompt = TTY::Prompt.new
|
11
|
+
service = prompt.select("Select Service?", services)
|
12
|
+
cron = prompt.ask("Cron Schedule?", default: "every 10 mins")
|
13
|
+
|
14
|
+
url = SOULs::GcloudRun.new.get_endpoint(service)
|
6
15
|
system(
|
7
|
-
"gcloud scheduler jobs create http #{app_name}-awake
|
8
|
-
--schedule '
|
16
|
+
"gcloud scheduler jobs create http #{app_name}-awake \
|
17
|
+
--schedule '#{cron}' --uri #{url} --http-method GET"
|
9
18
|
)
|
10
19
|
end
|
11
20
|
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.21.
|
1
|
+
1.21.8
|
@@ -1 +1 @@
|
|
1
|
-
1.21.
|
1
|
+
1.21.8
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: souls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.21.
|
4
|
+
version: 1.21.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-01-
|
13
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|