Guest User

Untitled

a guest
Apr 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. dat_files.each do |file|
  2. if File.exists?(file["filename"]) && File.size(file["filename"]) > 0
  3. case file["name"]
  4. when "echi_acds"
  5. EchiAcd.transaction do
  6. process_proper_table file
  7. end
  8. when "echi_agents"
  9. EchiAgent.transaction do
  10. process_proper_table file
  11. end
  12. when "echi_aux_reasons"
  13. EchiAuxReason.transaction do
  14. process_proper_table file
  15. end
  16. when "echi_cwcs"
  17. EchiCwc.transaction do
  18. process_proper_table file
  19. end
  20. when "echi_splits"
  21. EchiSplit.transaction do
  22. process_proper_table file
  23. end
  24. when "echi_trunk_groups"
  25. EchiTrunkGroup.transaction do
  26. process_proper_table file
  27. end
  28. when "echi_vdns"
  29. EchiVdn.transaction do
  30. process_proper_table file
  31. end
  32. when "echi_vectors"
  33. EchiVector.transaction do
  34. process_proper_table file
  35. end
  36. end
  37. else
  38. archive_file file, 0
  39. end
  40. end
Add Comment
Please, Sign In to add comment