Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dat_files.each do |file|
- if File.exists?(file["filename"]) && File.size(file["filename"]) > 0
- case file["name"]
- when "echi_acds"
- EchiAcd.transaction do
- process_proper_table file
- end
- when "echi_agents"
- EchiAgent.transaction do
- process_proper_table file
- end
- when "echi_aux_reasons"
- EchiAuxReason.transaction do
- process_proper_table file
- end
- when "echi_cwcs"
- EchiCwc.transaction do
- process_proper_table file
- end
- when "echi_splits"
- EchiSplit.transaction do
- process_proper_table file
- end
- when "echi_trunk_groups"
- EchiTrunkGroup.transaction do
- process_proper_table file
- end
- when "echi_vdns"
- EchiVdn.transaction do
- process_proper_table file
- end
- when "echi_vectors"
- EchiVector.transaction do
- process_proper_table file
- end
- end
- else
- archive_file file, 0
- end
- end
Add Comment
Please, Sign In to add comment