Sha256: 34a9858ca978ed5bb1f89c1780cf99da48d0f5f2e2a9f878cda0db2a914fc8e9

Contents?: true

Size: 909 Bytes

Versions: 2

Compression:

Stored size: 909 Bytes

Contents

RAILS_ENV = ENV['RAILS_ENV'] || 'development_async'
RAILS_ROOT = Dir.pwd

require 'rubygems'
require 'yaml'
require 'uri'
require 'em-resque'
require 'em-resque/worker_machine'
require 'em-resque/task_helper'

#require 'resque-kalashnikov'
#require 'resque/plugins/kalashnikov'
require '/www/resque-kalashnikov/lib/resque/plugins/kalashnikov'

#require 'resque-retry'
#require 'em-synchrony'
#require 'em-synchrony/connection_pool'
#require 'em-synchrony/mysql2'

require 'debugger'

#Dir.glob(File.join(RAILS_ROOT, 'lib', 'async_worker', '**', '*.rb')).sort.each{|f| require File.expand_path(f)}

#resque_config = YAML.load_file("#{RAILS_ROOT}/config/resque.yml")
#proxy_config = YAML.load_file("#{RAILS_ROOT}/config/proxy.yml")
#PROXY = proxy_config ? proxy_config[RAILS_ENV] : nil

opts = TaskHelper.parse_opts_from_env #.merge(:redis => resque_config[RAILS_ENV])
EM::Resque::WorkerMachine.new(opts).start

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque-kalashnikov-1.1.1 demo/script/resque_async.rb
resque-kalashnikov-1.1.0 demo/script/resque_async.rb