Sha256: 32780a48f27fe033aad58df5707d77509a24ea66ef92cf0c52ed1aab608fc886

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

require "rubygems"
require 'gorgon/originator'
require 'gorgon/listener'
require 'gorgon/worker_manager'

def start
  o = Originator.new
  o.originate
end

def listen
  l = Listener.new
  l.listen
end

def manage_workers
  config_path = ENV["GORGON_CONFIG_PATH"]

  manager = WorkerManager.build config_path
  manager.manage

  # For some reason I have to 'exit' here, otherwise WorkerManager process crashes
  exit
end

def usage
  #print instructions on how to use gorgon
end

case ARGV[0]
when nil
  start
when "start"
  start
when "listen"
  listen
when "manage_workers"
  manage_workers
else
  usage
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gorgon-0.0.2 bin/gorgon
gorgon-0.0.1 bin/gorgon