flapjack 1.2.0rc1 → 1.2.0rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/tasks/entities.rake CHANGED
@@ -11,7 +11,10 @@ FLAPJACK_ENV = ENV['FLAPJACK_ENV'] || 'production'
11
11
  namespace :entities do
12
12
 
13
13
  def redis
14
- @redis ||= Redis.new(@redis_config)
14
+ return @redis unless @redis.nil?
15
+ @redis = Redis.new(@redis_config.merge(:driver => :hiredis))
16
+ Flapjack::Data::Migration.migrate_entity_check_data_if_required(:redis => @redis)
17
+ @redis
15
18
  end
16
19
 
17
20
  def orphaned_entity_names
@@ -127,8 +130,8 @@ namespace :entities do
127
130
  if id.nil? || entity.nil?
128
131
  id ||= SecureRandom.uuid
129
132
  redis.multi
130
- redis.set("entity_id:#{name}", id)
131
- redis.hset("entity:#{id}", 'name', name)
133
+ redis.hset('all_entity_ids_by_name', name, id)
134
+ redis.hset('all_entity_names_by_id', id, name)
132
135
  redis.exec
133
136
  puts "Set id '#{id}' for entity #{name}'"
134
137
  elsif entity.name.eql?(name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flapjack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0rc1
4
+ version: 1.2.0rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lindsay Holmwood
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-10-08 00:00:00.000000000 Z
14
+ date: 2014-10-17 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: dante
@@ -433,6 +433,7 @@ files:
433
433
  - lib/flapjack/data/entity_check.rb
434
434
  - lib/flapjack/data/event.rb
435
435
  - lib/flapjack/data/message.rb
436
+ - lib/flapjack/data/migration.rb
436
437
  - lib/flapjack/data/notification.rb
437
438
  - lib/flapjack/data/notification_rule.rb
438
439
  - lib/flapjack/data/semaphore.rb