allora 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -57,7 +57,6 @@ module Allora
57
57
  set_last_time(current_time)
58
58
 
59
59
  jobs.select do |name, job|
60
- redis.hsetnx(schedule_info_key, name, 1)
61
60
  redis.setnx(job_info_key(name), time_to_int(job.next_at(last_time)))
62
61
  update_job_info(job, name, current_time)
63
62
  end
@@ -73,8 +72,7 @@ module Allora
73
72
 
74
73
  # Forces all job data to be re-entered into Redis at the next poll
75
74
  def reset!
76
- redis.hgetall(schedule_info_key) { |name, t| redis.del(job_info_key(name)) }
77
- redis.del(schedule_info_key)
75
+ redis.keys(job_info_key("*")).each { |k| redis.del(job_info_key(k)) }
78
76
  end
79
77
 
80
78
  # Returns a Boolean specifying if the job can be run and no race condition occurred updating its info
@@ -91,10 +89,6 @@ module Allora
91
89
  end
92
90
  end
93
91
 
94
- def schedule_info_key
95
- "#{prefix}_schedule"
96
- end
97
-
98
92
  def job_info_key(name)
99
93
  "#{prefix}_job_#{name}"
100
94
  end
@@ -22,5 +22,5 @@
22
22
  ##
23
23
 
24
24
  module Allora
25
- VERSION = "0.0.1"
25
+ VERSION = "0.0.2"
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-11 00:00:00.000000000 Z
12
+ date: 2012-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &70298724477660 !ruby/object:Gem::Requirement
16
+ requirement: &70330861546180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70298724477660
24
+ version_requirements: *70330861546180
25
25
  description: ! "Allora (Italian for \"at that time\") provides a replacement for the
26
26
  classic UNIX\n cron, using nothing but ruby. It is very small,
27
27
  easy to follow and relatively\n feature-light. It does support