Sha256: f58a1721d0e2e4c819c4bb005d8ace2b8e46969041747d02810653fb2d288cb7

Contents?: true

Size: 347 Bytes

Versions: 18

Compression:

Stored size: 347 Bytes

Contents

module Seabright
	module RedisObjectCleaner
		def self.clean!
			RedisObject.store.keys("*:collections").each do |key|
				if obj = RedisObject.find_by_key(key.gsub(/:collections$/,''))
					obj.collections.each do |nm,col|
						puts "Cleaning: #{nm} #{col.class} #{col.inspect}" if DEBUG
						col.cleanup!
					end
				end
			end
		end
	end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
redis_object-1.3.2 lib/redis_object/ext/cleaner.rb
redis_object-1.3.1b lib/redis_object/ext/cleaner.rb
redis_object-1.3.1 lib/redis_object/ext/cleaner.rb
redis_object-1.3.0 lib/redis_object/ext/cleaner.rb
redis_object-1.2.9b lib/redis_object/ext/cleaner.rb
redis_object-1.2.9 lib/redis_object/ext/cleaner.rb
redis_object-1.2.8 lib/redis_object/ext/cleaner.rb
redis_object-1.2.7 lib/redis_object/ext/cleaner.rb
redis_object-1.2.6 lib/redis_object/ext/cleaner.rb
redis_object-1.2.5 lib/redis_object/ext/cleaner.rb
redis_object-1.2.4 lib/redis_object/ext/cleaner.rb
redis_object-1.2.3 lib/redis_object/ext/cleaner.rb
redis_object-1.2.2 lib/redis_object/ext/cleaner.rb
redis_object-1.2.1 lib/redis_object/ext/cleaner.rb
redis_object-1.2 lib/redis_object/ext/cleaner.rb
redis_object-1.1 lib/redis_object/ext/cleaner.rb
redis_object-0.5.0 lib/redis_object/ext/cleaner.rb
redis_object-1.0 lib/redis_object/ext/cleaner.rb