Top Level Namespace
Defined Under Namespace
Modules: Disco, EventSource, EventSourceHelper, Rails, RailsDisco Classes: EventSourceController
Constant Summary collapse
- LOGGER =
ActiveEvent::Support::MultiLogger.new 'Rails Server'
- RELOADER =
ActiveSupport::FileUpdateChecker.new([], watchable_dirs) do ActiveEvent::Autoload.reload_module :ValidationsRegistry ActiveEvent::Autoload.reload ActiveProjection::Autoload.reload ActiveEvent::ValidationsRegistry.build end
- WORKER_COUNT =
[ENV['WORKER_COUNT'].to_i, 1].max
- WORKER_NUMBER =
ENV['WORKER_NUMBER'].to_i
- @@can_run =
With Rails Disco you can invoke domain commands
Examples:
city_id = domain_run(CityCreateCommand.new(name: 'Chicago')) domain_run(MayorCreateCommand(name: 'Emanuel', city_id: city_id)
true
Instance Method Summary collapse
Instance Method Details
#domain_run(command) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/generators/disco/app/templates/db/seeds.rb', line 9 def domain_run(command) Domain.run_command(command) if @@can_run rescue DRb::DRbConnError puts 'no domain server for seeds' @@can_run = false end |