Class: Euston::PipelineRakeTask
- Inherits:
-
Daemons::RakeTask
- Object
- Rake::TaskLib
- Daemons::RakeTask
- Euston::PipelineRakeTask
- Defined in:
- lib/euston-daemons/pipeline/rake_task.rb
Instance Attribute Summary collapse
-
#amqp_config_path ⇒ Object
Returns the value of attribute amqp_config_path.
-
#app_root ⇒ Object
Returns the value of attribute app_root.
-
#command_handler_namespaces ⇒ Object
Returns the value of attribute command_handler_namespaces.
-
#daemon_config_path ⇒ Object
Returns the value of attribute daemon_config_path.
-
#event_handler_namespaces ⇒ Object
Returns the value of attribute event_handler_namespaces.
-
#mongo_config_path ⇒ Object
Returns the value of attribute mongo_config_path.
-
#user_defined_components ⇒ Object
Returns the value of attribute user_defined_components.
Attributes inherited from Daemons::RakeTask
#bundler_groups, #daemon_class, #log_filename, #name, #pid_filename, #post_setup_callback, #verbose
Instance Method Summary collapse
- #before_creating_task ⇒ Object
-
#initialize(environment) ⇒ PipelineRakeTask
constructor
A new instance of PipelineRakeTask.
- #initialize_settings ⇒ Object
- #load_daemon_config_file ⇒ Object
- #load_environment ⇒ Object
Constructor Details
#initialize(environment) ⇒ PipelineRakeTask
Returns a new instance of PipelineRakeTask.
11 12 13 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 11 def initialize environment super(environment, :pipeline_daemon) end |
Instance Attribute Details
#amqp_config_path ⇒ Object
Returns the value of attribute amqp_config_path.
3 4 5 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 3 def amqp_config_path @amqp_config_path end |
#app_root ⇒ Object
Returns the value of attribute app_root.
3 4 5 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 3 def app_root @app_root end |
#command_handler_namespaces ⇒ Object
Returns the value of attribute command_handler_namespaces.
3 4 5 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 3 def command_handler_namespaces @command_handler_namespaces end |
#daemon_config_path ⇒ Object
Returns the value of attribute daemon_config_path.
3 4 5 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 3 def daemon_config_path @daemon_config_path end |
#event_handler_namespaces ⇒ Object
Returns the value of attribute event_handler_namespaces.
3 4 5 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 3 def event_handler_namespaces @event_handler_namespaces end |
#mongo_config_path ⇒ Object
Returns the value of attribute mongo_config_path.
3 4 5 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 3 def mongo_config_path @mongo_config_path end |
#user_defined_components ⇒ Object
Returns the value of attribute user_defined_components.
3 4 5 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 3 def user_defined_components @user_defined_components end |
Instance Method Details
#before_creating_task ⇒ Object
15 16 17 18 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 15 def before_creating_task @daemon_path = File.(File.dirname __FILE__) + File::SEPARATOR @daemon_class = 'Euston::Daemons::Pipeline::Daemon' end |
#initialize_settings ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 24 def initialize_settings @logger.debug "AMQP config path: #{@amqp_config_path}" @data[:amqp_config_path] = @amqp_config_path @logger.debug "Command handler namespaces: #{@command_handler_namespaces}" @data[:command_handler_namespaces] = @command_handler_namespaces @logger.debug "Daemon config path: #{@daemon_config_path}" @logger.debug "Event handler namespaces: #{@event_handler_namespaces}" @data[:event_handler_namespaces] = @event_handler_namespaces @logger.debug "Mongo config path: #{@mongo_config_path}" @data[:mongo_config_path] = @mongo_config_path @logger.debug "User-defined components: #{@user_defined_components.count}" @data[:user_defined_components] = @user_defined_components.to_a.flatten @logger.debug "App root: #{@app_root}" @data[:app_root] = @app_root end |
#load_daemon_config_file ⇒ Object
20 21 22 |
# File 'lib/euston-daemons/pipeline/rake_task.rb', line 20 def load_daemon_config_file @data[:daemon_config] = ErbYaml.read @daemon_config_path, @data[:environment] end |