lib/tasks/deimos.rake in deimos-kafka-1.0.0.pre.beta16 vs lib/tasks/deimos.rake in deimos-kafka-1.0.0.pre.beta17

- old
+ new

@@ -12,6 +12,16 @@ ENV['DEIMOS_RAKE_TASK'] = 'true' STDOUT.sync = true Rails.logger.info('Running deimos:start rake task.') Phobos::CLI::Commands.start(%w(start --skip_config)) end + + desc 'Starts the Deimos database producer' + task db_producer: :environment do + ENV['DEIMOS_RAKE_TASK'] = 'true' + STDOUT.sync = true + Rails.logger.info("Running deimos:db_producer rake task.") + thread_count = ENV['THREADS'].presence || 1 + Deimos.start_db_backend!(thread_count: thread_count) + end + end