Class: SolidQueue::Processes::Pidfile

Inherits:
Object
  • Object
show all
Defined in:
lib/solid_queue/processes/pidfile.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Pidfile

Returns a new instance of Pidfile.



5
6
7
8
# File 'lib/solid_queue/processes/pidfile.rb', line 5

def initialize(path)
  @path = path
  @pid = ::Process.pid
end

Instance Method Details

#deleteObject



16
17
18
# File 'lib/solid_queue/processes/pidfile.rb', line 16

def delete
  delete_file
end

#setupObject



10
11
12
13
14
# File 'lib/solid_queue/processes/pidfile.rb', line 10

def setup
  check_status
  write_file
  set_at_exit_hook
end