Sha256: d7b54bc55ebe5365d8276f5bfeb9d7c9b0e5871eaab7076b06eb3107da4de0c5
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
# Copyright © 2012 The Pennsylvania State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. namespace :scholarsphere do namespace :db do desc "delete all Generic Files in Fedora and Solr (This may take some time...)." task :deleteAll => :environment do unless Rails.env.integration? puts "Warning: this task is only for the integration environment!" next end GenericFile.find(:all, :rows => GenericFile.count).each(&:delete) end desc "delete 500 Generic Files from Fedora and Solr." task :delete500 => :environment do unless Rails.env.integration? puts "Warning: this task is only for the integration environment!" next end GenericFile.find(:all, :rows => 500).each(&:delete) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sufia-0.0.1.pre2 | tasks/scholarsphere-db.rake |
sufia-0.0.1.pre1 | tasks/scholarsphere-db.rake |