Module: ClockworkWeb
- Defined in:
- lib/clockwork_web.rb,
lib/clockwork_web/engine.rb,
lib/clockwork_web/version.rb,
app/helpers/clockwork_web/home_helper.rb,
app/controllers/clockwork_web/home_controller.rb
Defined Under Namespace
Modules: HomeHelper Classes: Engine, HomeController
Constant Summary collapse
- VERSION =
"0.0.2"
Class Attribute Summary collapse
-
.clock_path ⇒ Object
Returns the value of attribute clock_path.
-
.redis ⇒ Object
Returns the value of attribute redis.
Class Method Summary collapse
Class Attribute Details
.clock_path ⇒ Object
Returns the value of attribute clock_path.
12 13 14 |
# File 'lib/clockwork_web.rb', line 12 def clock_path @clock_path end |
.redis ⇒ Object
Returns the value of attribute redis.
13 14 15 |
# File 'lib/clockwork_web.rb', line 13 def redis @redis end |
Class Method Details
.disable(job) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/clockwork_web.rb', line 25 def self.disable(job) if redis redis.set("clockwork:disabled:#{job}", 1) true else false end end |
.enable(job) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/clockwork_web.rb', line 16 def self.enable(job) if redis redis.del("clockwork:disabled:#{job}") true else false end end |
.enabled?(job) ⇒ Boolean
34 35 36 37 38 39 40 |
# File 'lib/clockwork_web.rb', line 34 def self.enabled?(job) if redis !redis.exists("clockwork:disabled:#{job}") else true end end |