Sha256: 28a59c21821d07b4f9f359ece9e50b9a13c6aea65dc18e1e43b0a122346a5a08

Contents?: true

Size: 717 Bytes

Versions: 4

Compression:

Stored size: 717 Bytes

Contents

module Souls
  module Gcloud
    module Run
      class << self
        def awake(app_name: "", url: "")
          app_name = Souls.configuration.app if app_name.blank?
          system(
            "gcloud scheduler jobs create http #{app_name}-awake
            --schedule '0,10,20,30,40,50 * * * *' --uri #{url} --http-method GET"
          )
        end

        def list(project_id: "")
          project_id = Souls.configuration.project_id if project_id.blank?
          system("gcloud run services list --project #{project_id}")
        end

        def get_endpoint(worker_name: "")
          system("gcloud run services list | grep #{worker_name} | awk '{print $4}'")
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
souls-0.41.3 lib/souls/cli/gcloud/run/index.rb
souls-0.41.2 lib/souls/cli/gcloud/run/index.rb
souls-0.41.1 lib/souls/cli/gcloud/run/index.rb
souls-0.41.0 lib/souls/cli/gcloud/run/index.rb