Class: Daemon::AllocateWorkers::WorkerIds

Inherits:
Object
  • Object
show all
Defined in:
lib/onapp/engine/allocate_workers.rb

Overview

Used to generate unique ids for onappd instances

Instance Method Summary (collapse)

Constructor Details

- (WorkerIds) initialize

Returns a new instance of WorkerIds



11
12
13
# File 'lib/onapp/engine/allocate_workers.rb', line 11

def initialize
  @id = Daemon.another_instances_pids.count
end

Instance Method Details

- (Object) next



15
16
17
# File 'lib/onapp/engine/allocate_workers.rb', line 15

def next
  @id += 1
end