Module: QPush

Defined in:
lib/qpush/job.rb,
lib/qpush/redis.rb,
lib/qpush/config.rb,
lib/qpush/version.rb,
lib/qpush/web/get.rb,
lib/qpush/web/server.rb,
lib/qpush/server/jobs.rb,
lib/qpush/server/delay.rb,
lib/qpush/server/queue.rb,
lib/qpush/server/errors.rb,
lib/qpush/server/logger.rb,
lib/qpush/server/worker.rb,
lib/qpush/server/execute.rb,
lib/qpush/server/manager.rb,
lib/qpush/server/perform.rb,
lib/qpush/server/database.rb,
lib/qpush/server/launcher.rb

Defined Under Namespace

Modules: Job, Server, Web Classes: Config, Database, RedisPool, ServerError

Constant Summary collapse

VERSION =
'0.1.0'
CODENAME =
'Sun Soaked Salamander'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.redis_poolObject (readonly)

Returns the value of attribute redis_pool.



3
4
5
# File 'lib/qpush/redis.rb', line 3

def redis_pool
  @redis_pool
end

Class Method Details

.configObject



8
9
10
# File 'lib/qpush/config.rb', line 8

def config
  @config ||= Config.new
end

.configure {|config| ... } ⇒ Object

Yields:



3
4
5
6
# File 'lib/qpush/config.rb', line 3

def configure
  reset
  yield(config)
end

.dbObject



3
4
5
# File 'lib/qpush/server/database.rb', line 3

def db
  @db ||= Database.create
end

.job(options) ⇒ Object



3
4
5
6
# File 'lib/qpush/job.rb', line 3

def job(options)
  job = Job::Wrapper.new(options)
  job.queue
end

.redisObject



5
6
7
# File 'lib/qpush/redis.rb', line 5

def redis
  @redis_pool ||= RedisPool.create
end

.resetObject



12
13
14
15
# File 'lib/qpush/config.rb', line 12

def reset
  @config = nil
  @connection_pool = nil
end