Class: Daemon::Manager Deprecated

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

Overview

Deprecated.
TODO:

to be removed

Class Method Summary (collapse)

Class Method Details

+ (Object) active!



22
23
24
25
26
27
28
29
# File 'lib/onapp/engine/manager.rb', line 22

def active!
  attr_mutex.synchronize do
    return if @active

    @active = true
    Daemon.alert_daemon_active
  end
end

+ (Boolean) active?

Returns:

  • (Boolean)


44
45
46
# File 'lib/onapp/engine/manager.rb', line 44

def active?
  attr_mutex.synchronize { @active }
end

+ (Object) inactive!(force = false)



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/onapp/engine/manager.rb', line 31

def inactive!(force = false)
  if force
    @active = false
  else
    attr_mutex.synchronize do
      return unless @active

      @active = false
      Daemon.alert_daemon_inactive
     end
  end
end

+ (Boolean) inactive?

Returns:

  • (Boolean)


48
49
50
# File 'lib/onapp/engine/manager.rb', line 48

def inactive?
  !active?
end

+ (Object) pause



15
16
17
18
19
20
# File 'lib/onapp/engine/manager.rb', line 15

def pause
  return if inactive?

  Daemon::Management::Activity.forbid
  check_connection_and_resume
end

+ (Object) start!



9
10
11
12
13
# File 'lib/onapp/engine/manager.rb', line 9

def start!
  Daemon.log_beginning

  Management::Activity.init
end