Class: NeetoDeploy::CLI::Logs::Base

Inherits:
Base
  • Object
show all
Includes:
Constants, Session
Defined in:
lib/neeto_deploy/cli/logs/base.rb

Constant Summary collapse

POLL_INTERVAL_SECONDS =
2
INITIAL_LIMIT =
100
POLL_LIMIT =
1000
HISTORIC_DEFAULT_LIMIT =
500
RELATIVE_TIME_PATTERN =
/\A(\d+)(m|h|d)\z/

Constants included from Session

Session::CONSOLE_EXECUTABLE

Constants included from Constants

Constants::NEETO_DEPLOY_CLI_API_V2_APPS_URL, Constants::NEETO_DEPLOY_CLI_API_V2_LOGS_URL, Constants::NEETO_DEPLOY_CLI_V2_API_BASE_URL

Instance Attribute Summary collapse

Attributes inherited from Base

#ui

Instance Method Summary collapse

Methods included from Session

#auth_headers, #console_executable_name, #json_auth_headers, #os, require_app_option, #send_delete_request, #send_get_request, #send_patch_request, #send_post_request

Methods included from Constants

#app_details_url, #logs_v2_url

Methods inherited from Base

#create_config_dir

Constructor Details

#initialize(options) ⇒ Base

Returns a new instance of Base.



26
27
28
29
30
31
32
# File 'lib/neeto_deploy/cli/logs/base.rb', line 26

def initialize(options)
  super()
  @options = options
  @app_slug = options[:app]
  @process_type = options[:process_type]
  @last_timestamp_ms = nil
end

Instance Attribute Details

#app_slugObject (readonly)

Returns the value of attribute app_slug.



24
25
26
# File 'lib/neeto_deploy/cli/logs/base.rb', line 24

def app_slug
  @app_slug
end

#optionsObject (readonly)

Returns the value of attribute options.



24
25
26
# File 'lib/neeto_deploy/cli/logs/base.rb', line 24

def options
  @options
end

#process_typeObject (readonly)

Returns the value of attribute process_type.



24
25
26
# File 'lib/neeto_deploy/cli/logs/base.rb', line 24

def process_type
  @process_type
end

Instance Method Details

#process!Object



34
35
36
37
38
39
40
# File 'lib/neeto_deploy/cli/logs/base.rb', line 34

def process!
  if historic_mode?
    process_historic!
  else
    process_live!
  end
end