Permalink
Browse files

Clear transient data initializer: don't try to predict how we got her…

…e, just check if we can run
  • Loading branch information...
1 parent c093474 commit ebec19585411d1b8459d5d022e720aeedf22c27f @etdsoft etdsoft committed Feb 17, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 config/initializers/clear_transient_data.rb
@@ -2,8 +2,5 @@
# longer useful and can be disposed of.
Rails.logger.info "Clearing old Logs and Feeds..."
-# Check that we are in normal operating mode, if we are in dradis:reset, skip.
-unless ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations_paths).pending_migrations.empty?
- Log.destroy_all
- Feed.destroy_all
-end
+Log.destroy_all if Log.table_exists?
+Feed.destroy_all if Feed.table_exists?

0 comments on commit ebec195

Please sign in to comment.