Add two rake tasks: db:rebuild_indexes and import:remove_backup

This commit is contained in:
Neil Lalonde
2014-01-31 14:16:15 -05:00
parent e6096b4524
commit 3a6c3ee65d
3 changed files with 85 additions and 1 deletions

View File

@@ -27,6 +27,10 @@ module Import
$redis.del import_running_key
end
def self.backup_tables_count
User.exec_sql("select count(*) as count from information_schema.tables where table_schema = '#{Jobs::Importer::BACKUP_SCHEMA}'")[0]['count'].to_i
end
def self.clear_adapters
@adapters = {}