Commit b20241d2 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

implemented worker rake task

parent 64f0f308
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ module FnordMetric
  def self.run
    start_em
  rescue Exception => e
    raise e
    log "!!! eventmachine died, restarting... #{e.message}"
    sleep(1); run
  end
+12 −3
Original line number Diff line number Diff line
@@ -5,6 +5,15 @@ task :run do
  FnordMetric.run
end

task :worker do
  FnordMetric.server_configuration = {
    :web_interface  => false,
    :inbound_stream => false,
    :start_worker   => true
  }
  FnordMetric.run
end

task :log do
  FnordMetric::Logger.start(dump_file_path)
end
@@ -14,7 +23,7 @@ task :import do
end

task :help do
  puts "usage: #{$0} {run|log|import} [DUMP_FILE=fm_dump.json]"
  puts "usage: #{$0} {run|worker|log|import} [DUMP_FILE=fm_dump.json]"
end

task :default => :help