Class: Avm::EacRailsBase1::Instances::Processes::Daemon

Inherits:
Instances::Process
  • Object
show all
Defined in:
lib/avm/eac_rails_base1/instances/processes/daemon.rb

Direct Known Subclasses

TasksScheduler

Instance Method Summary collapse

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/avm/eac_rails_base1/instances/processes/daemon.rb', line 14

def available?
  instance.application.local_source.gemfile_lock_gem_version(gem_name).present?
end

#disableObject



18
19
20
# File 'lib/avm/eac_rails_base1/instances/processes/daemon.rb', line 18

def disable
  daemon_command(:stop).system!
end

#enableObject



22
23
24
# File 'lib/avm/eac_rails_base1/instances/processes/daemon.rb', line 22

def enable
  daemon_command(:start).system!
end

#enabled?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/avm/eac_rails_base1/instances/processes/daemon.rb', line 26

def enabled?
  daemon_command(:status).execute.fetch(:exit_code).zero?
end