Sha256: 0293baea2646e649f840737bfa6955d417ebd1e357a22a255a9596bff9cf0160

Contents?: true

Size: 726 Bytes

Versions: 19

Compression:

Stored size: 726 Bytes

Contents

module Souls
  module Gcloud
    module Run
      class << self
        def awake(app_name: "souls-app", 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

19 entries across 19 versions & 1 rubygems

Version Path
souls-0.40.3 lib/souls/cli/gcloud/run/index.rb
souls-0.40.2 lib/souls/cli/gcloud/run/index.rb
souls-0.40.1 lib/souls/cli/gcloud/run/index.rb
souls-0.40.0 lib/souls/cli/gcloud/run/index.rb
souls-0.39.0 lib/souls/cli/gcloud/run/index.rb
souls-0.38.6 lib/souls/cli/gcloud/run/index.rb
souls-0.38.5 lib/souls/cli/gcloud/run/index.rb
souls-0.38.4 lib/souls/cli/gcloud/run/index.rb
souls-0.38.3 lib/souls/cli/gcloud/run/index.rb
souls-0.38.2 lib/souls/cli/gcloud/run/index.rb
souls-0.38.1 lib/souls/cli/gcloud/run/index.rb
souls-0.38.0 lib/souls/cli/gcloud/run/index.rb
souls-0.37.0 lib/souls/cli/gcloud/run/index.rb
souls-0.36.4 lib/souls/cli/gcloud/run/index.rb
souls-0.36.3 lib/souls/cli/gcloud/run/index.rb
souls-0.36.2 lib/souls/cli/gcloud/run/index.rb
souls-0.36.1 lib/souls/cli/gcloud/run/index.rb
souls-0.36.0 lib/souls/cli/gcloud/run/index.rb
souls-0.35.4 lib/souls/cli/gcloud/run/index.rb