Sha256: 6970d44a10fe7529c831a4a416d9a0d9ae2b82c4e2cf88199e9c247e7744da6d
Contents?: true
Size: 783 Bytes
Versions: 2
Compression:
Stored size: 783 Bytes
Contents
namespace :redis do desc "Reset active Redis databases" task reset: :environment do puts "== Reset: reseting active ".ljust(80, "=") total_task_start_time = Time.current ActiveOrm::Redis::Connection.flush total_task_elapsed_time = (Time.current - total_task_start_time).round(5) puts "== Reset: reset active (#{total_task_elapsed_time}s) ".ljust(80, "=") puts "" end desc "Reset all Redis databases" task reset_all: :environment do puts "== Reset: reseting all ".ljust(80, "=") total_task_start_time = Time.current ActiveOrm::Redis::Connection.flush_all total_task_elapsed_time = (Time.current - total_task_start_time).round(5) puts "== Reset: reset all (#{total_task_elapsed_time}s) ".ljust(80, "=") puts "" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_orm-2.0.1 | lib/tasks/redis.rake |
active_orm-2.0.0 | lib/tasks/redis.rake |