lib/observed/context.rb in observed-0.2.0.rc1 vs lib/observed/context.rb in observed-0.2.0.rc2

- old
+ new

@@ -1,12 +1,12 @@ require 'logger' require 'observed/system' require 'observed/config_builder' require 'observed/config_dsl' -require 'observed/job' -require 'observed/jobbed_event_bus' +require 'observed/task' +require 'observed/event_bus' module Observed # The run context of an Observed system. # It can be initialized via parameters to automatically configure the system and everything needed such as the config # builder, the DSL, the logger, etc. @@ -44,22 +44,22 @@ def system @system ||= Observed::System.new(logger: logger, context: self) end def executor - @executor ||= Observed::BlockingJobExecutor.new + @executor ||= Observed::BlockingExecutor.new end - def jobbed_event_bus - @event_bus ||= Observed::JobbedEventBus.new(job_factory: job_factory) + def event_bus + @event_bus ||= Observed::EventBus.new(task_factory: task_factory) end - def job_factory - @job_factory ||= Observed::JobFactory.new(executor: executor) + def task_factory + @task_factory ||= Observed::TaskFactory.new(executor: executor) end - def execution_job_factory - @execution_job_factory ||= Observed::ExecutionJobFactory.new(job_factory: job_factory) + def observed_task_factory + @observed_task_factory ||= Observed::ObservedTaskFactory.new(task_factory: task_factory) end def config_builder @config_builder ||= Observed::ConfigBuilder.new(system: system, logger: logger, context: self) end