Symphony::Metronome::

ScheduleTask class

Accept metronome scheduling events, translating them to DB rows for persistence.

Attributes

actions R

The Sequel dataset of scheduled event actions.

Public Class Methods

new( * )

Get a handle to the database.

# File lib/symphony/tasks/scheduletask.rb, line 20
def initialize( * )
        @db = Symphony::Metronome::ScheduledEvent.db
        @actions = @db[ :metronome ]
        super
end

Public Instance Methods

signal_parent()

Tell our parent (the Metronome broadcaster) to re-read its event list.

# File lib/symphony/tasks/scheduletask.rb, line 68
def signal_parent
        parent = Process.ppid

        # Check to make sure we weren't orphaned.
        #
        if parent == 1
                self.log.error "Lost my parent process?  Exiting."
                exit 1
        end

        Process.kill( 'HUP', parent )
end