Sha256: 85ea2161d1be753d94201bbe273f5f982b57eaba38262eb023222972fa6eb997
Contents?: true
Size: 796 Bytes
Versions: 5
Compression:
Stored size: 796 Bytes
Contents
# frozen_string_literal: true require 'phobos' require 'phobos/cli' namespace :deimos do desc 'Starts Deimos in the rails environment' task start: :environment do Deimos.configure do |config| config.publish_backend = :kafka_sync if config.publish_backend == :kafka_async end 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
Version data entries
5 entries across 5 versions & 2 rubygems