Class: Exekutor::Internal::CLI::Info
- Inherits:
-
Object
- Object
- Exekutor::Internal::CLI::Info
- Includes:
- ApplicationLoader
- Defined in:
- lib/exekutor/internal/cli/info.rb
Overview
Prints info for the CLI
Constant Summary
Constants included from ApplicationLoader
ApplicationLoader::LOADING_MESSAGE
Instance Method Summary collapse
-
#initialize(options) ⇒ Info
constructor
A new instance of Info.
-
#print(options) ⇒ Object
Prints Exekutor info to STDOUT.
Methods included from ApplicationLoader
#clear_application_loading_message, #different_time_zone?, #load_application, #print_time_zone_warning
Constructor Details
#initialize(options) ⇒ Info
Returns a new instance of Info.
15 16 17 |
# File 'lib/exekutor/internal/cli/info.rb', line 15 def initialize() @global_options = end |
Instance Method Details
#print(options) ⇒ Object
Prints Exekutor info to STDOUT
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/exekutor/internal/cli/info.rb', line 20 def print() load_application([:environment], print_message: !quiet?) ActiveSupport.on_load(:active_record, yield: true) do print_time_zone_warning if different_time_zone? && !quiet? hosts = Exekutor::Info::Worker.distinct.pluck(:hostname) job_info = pending_jobs_per_queue print_workers(hosts, job_info.present?, ) puts print_jobs(job_info) end end |