lib/flapjack/cli/purge.rb in flapjack-1.2.1 vs lib/flapjack/cli/purge.rb in flapjack-1.2.2

- old
+ new

@@ -38,10 +38,11 @@ Flapjack::Data::EntityCheck.all(:redis => redis, :create_entity => true) end purged = checks.inject([]) do |memo, check| pu = check.purge_history(options) memo << pu unless pu == 0 + memo end if purged.empty? puts "Nothing to do" else @@ -53,9 +54,10 @@ def redis return @redis unless @redis.nil? @redis = Redis.new(@redis_options.merge(:driver => :hiredis)) Flapjack::Data::Migration.migrate_entity_check_data_if_required(:redis => @redis) + Flapjack::Data::Migration.clear_orphaned_entity_ids(:redis => @redis) @redis end end end