Module: Occurro
- Defined in:
- lib/occurro.rb,
lib/occurro/tasks.rb,
lib/occurro/engine.rb,
lib/occurro/version.rb,
lib/occurro/jobs/resque.rb,
lib/occurro/jobs/sender.rb,
lib/occurro/has_counters.rb,
app/models/occurro/counter.rb,
lib/occurro/cached_counter.rb,
lib/occurro/cached_session.rb,
lib/occurro/jobs/delayed_job.rb,
app/models/occurro/daily_counter.rb,
app/helpers/occurro/application_helper.rb,
app/controllers/occurro/counters_controller.rb,
app/controllers/occurro/application_controller.rb,
lib/generators/occurro/migrations/migrations_generator.rb
Defined Under Namespace
Modules: ApplicationHelper, CachedCounter, CachedSession, HasCounters, Jobs, Tasks Classes: ApplicationController, Counter, CountersController, DailyCounter, Engine, MigrationsGenerator
Constant Summary collapse
- VERSION =
"0.2.5"
- @@custom_job =
false
Class Method Summary collapse
-
.configure {|_self| ... } ⇒ Object
Global configuration Options:.
Class Method Details
.configure {|_self| ... } ⇒ Object
Global configuration Options:
-
custom_job= #=> Defaults to false
Accepts :resque, :delayed_job or a custom proc(model, count) false will make a synchronous call to the model and increment the counter :resque will enqueue a simple job to increment the counter in Resque :delayed_job will do the same, but for DelayedJob a custom proc (or a class that accepts call) will call this instead, you can use it to create a custom job for resque, delayed_job, or any other
Example:
Occurro.configure do |config|
config.custom_job = :resque
end
32 33 34 |
# File 'lib/occurro.rb', line 32 def self.configure yield(self) end |