module Symphony::Metronome
Constants
- CONFIG_ENV
The name of the environment variable to check for config file overrides
- DATADIR
The data directory that contains migration files.
- DEFAULT_CONFIG_FILE
The path to the default config file
- REVISION
Version-control revision constant
- VERSION
Library version constant
Public Class Methods
config()
click to toggle source
Get the loaded config (a Configurability::Config object)
# File lib/symphony/metronome.rb, line 42 def self::config Configurability.loaded_config end
load_config( config_file=nil, defaults=nil )
click to toggle source
Load the specified config_file
, install the config in all objects with Configurability, and call any callbacks registered via after_configure.
# File lib/symphony/metronome.rb, line 49 def self::load_config( config_file=nil, defaults=nil ) config_file ||= ENV[ CONFIG_ENV ] || DEFAULT_CONFIG_FILE defaults ||= Configurability.gather_defaults config = Configurability::Config.load( config_file, defaults ) config.install end
Public Instance Methods
run( &block )
click to toggle source
Convenience method for running the scheduler.
# File lib/symphony/metronome.rb, line 72 def run( &block ) raise LocalJumpError, "No block provided." unless block_given? return Symphony::Metronome::Scheduler.run( &block ) end