Class: KM::Resque

Inherits:
Object
  • Object
show all
Defined in:
lib/km/resque.rb,
lib/km/resque/set_job.rb,
lib/km/resque/version.rb,
lib/km/resque/alias_job.rb,
lib/km/resque/api_client.rb,
lib/km/resque/record_job.rb,
lib/km/resque/configuration.rb

Defined Under Namespace

Classes: AliasJob, ApiClient, Configuration, Error, RecordJob, SetJob

Constant Summary collapse

VERSION =
"0.9.3"

Class Method Summary collapse

Class Method Details

.alias(identifier1, identifier2) ⇒ Object



16
17
18
# File 'lib/km/resque.rb', line 16

def self.alias(identifier1, identifier2)
  ::Resque.enqueue(AliasJob, identifier1, identifier2, Time.now.to_i)
end

.configurationObject



13
14
15
# File 'lib/km/resque.rb', line 13

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:



10
11
12
# File 'lib/km/resque.rb', line 10

def self.configure(&block)
  yield configuration
end

.record(identifier, eventName, properties) ⇒ Object



22
23
24
# File 'lib/km/resque.rb', line 22

def self.record(identifier, eventName, properties)
  ::Resque.enqueue(RecordJob, identifier, eventName, properties, Time.now.to_i)
end

.set(identifier, properties) ⇒ Object



19
20
21
# File 'lib/km/resque.rb', line 19

def self.set(identifier, properties)
  ::Resque.enqueue(SetJob, identifier, properties, Time.now.to_i)
end