Module: Aptible::CLI::Subcommands::Ps

Included in:
Agent
Defined in:
lib/aptible/cli/subcommands/ps.rb

Class Method Summary collapse

Class Method Details

.included(thor) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/aptible/cli/subcommands/ps.rb', line 7

def self.included(thor)
  thor.class_eval do
    include Helpers::Operation
    include Helpers::App

    desc 'ps', 'Display running processes for an app - DEPRECATED'
    app_options
    def ps
      deprecated('This command is deprecated on Aptible v2 stacks.')

      app = ensure_app(options)

      op = app.create_operation!(type: 'ps', status: 'succeeded')

      ENV['ACCESS_TOKEN'] = fetch_token
      opts = ['-o', 'SendEnv=ACCESS_TOKEN']
      exit_with_ssh_portal(op, *opts)
    end
  end
end