Sha256: faa87647c4d940cb9827128371e41faad3c0c625fcdfe65d406547d45b89cd9f
Contents?: true
Size: 1.03 KB
Versions: 111
Compression:
Stored size: 1.03 KB
Contents
module Souls class CloudRun < Thor desc "awake", "Set Ping Every 15min by Google Cloud Scheduler" method_option :url, default: "https://souls.souls.nl", aliases: "--url", desc: "Set URL" def awake app_name = Souls.configuration.app system( "gcloud scheduler jobs create http #{app_name}-awake --schedule '0,10,20,30,40,50 * * * *' --uri #{url} --http-method GET" ) rescue Thor::Error => e raise(Thor::Error, e) end desc "list", "Show Google Cloud Run List" def list project_id = Souls.configuration.project_id system("gcloud run services list --project #{project_id} --platform managed") rescue Thor::Error => e raise(Thor::Error, e) end desc "get_endpoint", "Show Worker's Endpoint" def get_endpoint(worker_name: "") project_id = Souls.configuration.project_id `gcloud run services list --project #{project_id} | grep #{worker_name} | awk '{print $4}'` rescue Thor::Error => e raise(Thor::Error, e) end end end
Version data entries
111 entries across 111 versions & 1 rubygems