Class: Smartguard::Applications::Smartkiosk::Scheduler

Inherits:
Process
  • Object
show all
Defined in:
lib/smartguard/applications/smartkiosk/scheduler.rb

Instance Attribute Summary

Attributes inherited from Process

#path, #pid

Instance Method Summary collapse

Methods inherited from Process

#active?, #initialize, #wanted?

Constructor Details

This class inherits a constructor from Smartguard::Process

Instance Method Details

#startObject



7
8
9
10
11
12
13
14
15
# File 'lib/smartguard/applications/smartkiosk/scheduler.rb', line 7

def start
  super

  Logging.logger.info "Starting scheduler"

  run @path, {
      'RACK_ENV' => Smartguard.environment.to_s
    }, "bundle", "exec", "rake", "schedule"
end

#stopObject



17
18
19
20
21
22
# File 'lib/smartguard/applications/smartkiosk/scheduler.rb', line 17

def stop
  super

  Logging.logger.info "Stoping scheduler"
  kill_and_wait :TERM, 5
end