20150701000001_add_cleanup.rb 778 B

123456789101112131415161718192021222324252627282930313233
  1. class AddCleanup < ActiveRecord::Migration
  2. def up
  3. # delete old entries
  4. Scheduler.create_or_update(
  5. name: 'Delete old activity stream entries.',
  6. method: 'ActivityStream.cleanup',
  7. period: 1.day,
  8. prio: 2,
  9. active: true,
  10. updated_by_id: 1,
  11. created_by_id: 1,
  12. )
  13. Scheduler.create_or_update(
  14. name: 'Delete old online notification entries.',
  15. method: 'OnlineNotification.cleanup',
  16. period: 12.hours,
  17. prio: 2,
  18. active: true,
  19. updated_by_id: 1,
  20. created_by_id: 1,
  21. )
  22. Scheduler.create_or_update(
  23. name: 'Delete old entries.',
  24. method: 'RecentView.cleanup',
  25. period: 1.day,
  26. prio: 2,
  27. active: true,
  28. updated_by_id: 1,
  29. created_by_id: 1,
  30. )
  31. end
  32. end