Top Level Namespace

Defined Under Namespace

Modules: BlackStack

Constant Summary collapse

PARSER =

parse command line parameters

BlackStack::SimpleCommandLineParser.new(
    :description => 'This script starts an infinite loop. Each loop will look for a task to perform. Must be a delay between each loop.',
    :configuration => [{
        :name=>'delay',
        :mandatory=>false,
        :default=>10, # 5 minutes 
        :description=>'Minimum delay between loops. A minimum of 10 seconds is recommended, in order to don\'t hard the database server. Default is 30 seconds.', 
        :type=>BlackStack::SimpleCommandLineParser::INT,
    }, {
        :name=>'config',
        :mandatory=>false,
        :default=>'config.rb', 
        :description=>'Configuration file. Default: config.', 
        :type=>BlackStack::SimpleCommandLineParser::STRING,
    }, {
        :name=>'db',
        :mandatory=>false,
        :default=>'postgres', 
        :description=>'Database driver. Supported values: postgres, crdb. Default: postgres.', 
        :type=>BlackStack::SimpleCommandLineParser::STRING,
    }, {
        :name=>'log',
        :mandatory=>false,
        :default=>true, 
        :description=>'If write log in the file ./dispatcher.log or not. Default: "yes"', 
        :type=>BlackStack::SimpleCommandLineParser::BOOL,
    }]
)
DB =
BlackStack::CRDB::connect
PORT =
PARSER.value("port")