souls 1.21.5 → 1.21.9
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 +1 -1
- 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: 1cd807f4db6dbc1d398cfb9f62c2d8c3f31f1cddd0d6861114e0ba612294d344
|
4
|
+
data.tar.gz: 46e73736e7402312e43a2afb60c768f7ad2d4f2725050ea016a7cc8b0695e6cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fa72844bec0cb42baabe68cc55a7df9f873adb9b601cd3026830b89fb0d2e483f334fa256a0ffc9a6d114607a26fa5788975885c3ea89c90326c6e40b07e90a
|
7
|
+
data.tar.gz: cd57323fa304ca071bdc27e882349262b4c3f79adde614e0016c5e92d8820eab341aa410cc85096136abc89af08f9c557769bd97af417246ae138bacb6b415f4
|
@@ -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 { |f| f[: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.9
|
@@ -1 +1 @@
|
|
1
|
-
1.21.
|
1
|
+
1.21.9
|
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.9
|
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
|