Class: FooSubprocessLoop

Inherits:
Archfiend::SubprocessLoop show all
Defined in:
lib/archfiend/generators/daemon/templates/app/subprocess_loops/foo_subprocess_loop.rb

Overview

A dummy SubprocessLoop that logs Hello World every 10 seconds, offseted by 5 seconds

Constant Summary

Constants inherited from Archfiend::SubprocessLoop

Archfiend::SubprocessLoop::EXCEPTION_DELAY

Instance Attribute Summary

Attributes inherited from Archfiend::SubprocessLoop

#app

Instance Method Summary collapse

Methods inherited from Archfiend::SubprocessLoop

inherited, kill_all, start_all

Methods included from Archfiend::SharedLoop::Runnable

#log_exception

Instance Method Details

#iterateObject



8
9
10
11
12
# File 'lib/archfiend/generators/daemon/templates/app/subprocess_loops/foo_subprocess_loop.rb', line 8

def iterate
  msg = "Hello World from #{self.class.name}"
  logger.info(msg)
  sleep 10
end

#runObject



3
4
5
6
# File 'lib/archfiend/generators/daemon/templates/app/subprocess_loops/foo_subprocess_loop.rb', line 3

def run
  sleep 5
  super
end