schedulers.rb 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. Scheduler.create_if_not_exists(
  2. name: 'Process pending tickets',
  3. method: 'Ticket.process_pending',
  4. period: 15.minutes,
  5. prio: 1,
  6. active: true,
  7. )
  8. Scheduler.create_if_not_exists(
  9. name: 'Process escalation tickets',
  10. method: 'Ticket.process_escalation',
  11. period: 5.minutes,
  12. prio: 1,
  13. active: true,
  14. )
  15. Scheduler.create_if_not_exists(
  16. name: 'Process auto unassign tickets',
  17. method: 'Ticket.process_auto_unassign',
  18. period: 10.minutes,
  19. prio: 1,
  20. active: true,
  21. )
  22. Scheduler.create_if_not_exists(
  23. name: 'Import OTRS diff load',
  24. method: 'Import::OTRS.diff_worker',
  25. period: 3.minutes,
  26. prio: 1,
  27. active: true,
  28. updated_by_id: 1,
  29. created_by_id: 1,
  30. )
  31. Scheduler.create_if_not_exists(
  32. name: 'Check Channels',
  33. method: 'Channel.fetch',
  34. period: 30.seconds,
  35. prio: 1,
  36. active: true,
  37. updated_by_id: 1,
  38. created_by_id: 1,
  39. )
  40. Scheduler.create_if_not_exists(
  41. name: 'Check streams for Channel',
  42. method: 'Channel.stream',
  43. period: 60.seconds,
  44. prio: 1,
  45. active: true,
  46. updated_by_id: 1,
  47. created_by_id: 1,
  48. )
  49. Scheduler.create_if_not_exists(
  50. name: 'Generate Session data',
  51. method: 'Sessions.jobs',
  52. period: 60.seconds,
  53. prio: 1,
  54. active: true,
  55. updated_by_id: 1,
  56. created_by_id: 1,
  57. )
  58. Scheduler.create_if_not_exists(
  59. name: 'Execute jobs',
  60. method: 'Job.run',
  61. period: 5.minutes,
  62. prio: 2,
  63. active: true,
  64. updated_by_id: 1,
  65. created_by_id: 1,
  66. )
  67. Scheduler.create_if_not_exists(
  68. name: 'Cleanup expired sessions',
  69. method: 'SessionHelper.cleanup_expired',
  70. period: 60 * 60 * 12,
  71. prio: 2,
  72. active: true,
  73. updated_by_id: 1,
  74. created_by_id: 1,
  75. )
  76. Scheduler.create_if_not_exists(
  77. name: 'Delete old activity stream entries.',
  78. method: 'ActivityStream.cleanup',
  79. period: 1.day,
  80. prio: 2,
  81. active: true,
  82. updated_by_id: 1,
  83. created_by_id: 1,
  84. )
  85. Scheduler.create_if_not_exists(
  86. name: 'Delete old entries.',
  87. method: 'RecentView.cleanup',
  88. period: 1.day,
  89. prio: 2,
  90. active: true,
  91. updated_by_id: 1,
  92. created_by_id: 1,
  93. )
  94. Scheduler.create_or_update(
  95. name: 'Delete old online notification entries.',
  96. method: 'OnlineNotification.cleanup',
  97. period: 2.hours,
  98. prio: 2,
  99. active: true,
  100. updated_by_id: 1,
  101. created_by_id: 1,
  102. )
  103. Scheduler.create_or_update(
  104. name: 'Delete old token entries.',
  105. method: 'Token.cleanup',
  106. period: 30.days,
  107. prio: 2,
  108. active: true,
  109. updated_by_id: 1,
  110. created_by_id: 1,
  111. )
  112. Scheduler.create_or_update(
  113. name: 'Closed chat sessions where participients are offline.',
  114. method: 'Chat.cleanup_close',
  115. period: 15.minutes,
  116. prio: 2,
  117. active: true,
  118. updated_by_id: 1,
  119. created_by_id: 1,
  120. )
  121. Scheduler.create_or_update(
  122. name: 'Cleanup closed sessions.',
  123. method: 'Chat.cleanup',
  124. period: 5.days,
  125. prio: 2,
  126. active: true,
  127. updated_by_id: 1,
  128. created_by_id: 1,
  129. )
  130. Scheduler.create_or_update(
  131. name: 'Sync calendars with ical feeds.',
  132. method: 'Calendar.sync',
  133. period: 1.day,
  134. prio: 2,
  135. active: true,
  136. updated_by_id: 1,
  137. created_by_id: 1,
  138. )
  139. Scheduler.create_or_update(
  140. name: 'Generate user based stats.',
  141. method: 'Stats.generate',
  142. period: 11.minutes,
  143. prio: 2,
  144. active: true,
  145. updated_by_id: 1,
  146. created_by_id: 1,
  147. )
  148. Scheduler.create_or_update(
  149. name: 'Delete old stats store entries.',
  150. method: 'StatsStore.cleanup',
  151. period: 31.days,
  152. prio: 2,
  153. active: true,
  154. updated_by_id: 1,
  155. created_by_id: 1,
  156. )
  157. Scheduler.create_if_not_exists(
  158. name: 'Cleanup HttpLog',
  159. method: 'HttpLog.cleanup',
  160. period: 1.day,
  161. prio: 2,
  162. active: true,
  163. updated_by_id: 1,
  164. created_by_id: 1,
  165. )
  166. Scheduler.create_if_not_exists(
  167. name: 'Cleanup Cti::Log',
  168. method: 'Cti::Log.cleanup',
  169. period: 1.month,
  170. prio: 2,
  171. active: true,
  172. updated_by_id: 1,
  173. created_by_id: 1,
  174. )
  175. Scheduler.create_if_not_exists(
  176. name: 'Import Jobs',
  177. method: 'ImportJob.start_registered',
  178. period: 1.hour,
  179. prio: 1,
  180. active: true,
  181. updated_by_id: 1,
  182. created_by_id: 1
  183. )