sidekiq_cleaner 5.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +61 -0
  3. data/.github/contributing.md +32 -0
  4. data/.github/issue_template.md +11 -0
  5. data/.gitignore +15 -0
  6. data/.travis.yml +11 -0
  7. data/3.0-Upgrade.md +70 -0
  8. data/4.0-Upgrade.md +53 -0
  9. data/5.0-Upgrade.md +56 -0
  10. data/COMM-LICENSE +97 -0
  11. data/Changes.md +1536 -0
  12. data/Ent-Changes.md +238 -0
  13. data/Gemfile +23 -0
  14. data/LICENSE +9 -0
  15. data/Pro-2.0-Upgrade.md +138 -0
  16. data/Pro-3.0-Upgrade.md +44 -0
  17. data/Pro-4.0-Upgrade.md +35 -0
  18. data/Pro-Changes.md +759 -0
  19. data/README.md +55 -0
  20. data/Rakefile +9 -0
  21. data/bin/sidekiq +18 -0
  22. data/bin/sidekiqctl +20 -0
  23. data/bin/sidekiqload +149 -0
  24. data/cleaner/assets/images/favicon.ico +0 -0
  25. data/cleaner/assets/images/logo.png +0 -0
  26. data/cleaner/assets/images/status.png +0 -0
  27. data/cleaner/assets/javascripts/application.js +172 -0
  28. data/cleaner/assets/javascripts/dashboard.js +315 -0
  29. data/cleaner/assets/stylesheets/application-rtl.css +246 -0
  30. data/cleaner/assets/stylesheets/application.css +1144 -0
  31. data/cleaner/assets/stylesheets/bootstrap-rtl.min.css +9 -0
  32. data/cleaner/assets/stylesheets/bootstrap.css +5 -0
  33. data/cleaner/locales/ar.yml +81 -0
  34. data/cleaner/locales/cs.yml +78 -0
  35. data/cleaner/locales/da.yml +68 -0
  36. data/cleaner/locales/de.yml +69 -0
  37. data/cleaner/locales/el.yml +68 -0
  38. data/cleaner/locales/en.yml +81 -0
  39. data/cleaner/locales/es.yml +70 -0
  40. data/cleaner/locales/fa.yml +80 -0
  41. data/cleaner/locales/fr.yml +78 -0
  42. data/cleaner/locales/he.yml +79 -0
  43. data/cleaner/locales/hi.yml +75 -0
  44. data/cleaner/locales/it.yml +69 -0
  45. data/cleaner/locales/ja.yml +80 -0
  46. data/cleaner/locales/ko.yml +68 -0
  47. data/cleaner/locales/nb.yml +77 -0
  48. data/cleaner/locales/nl.yml +68 -0
  49. data/cleaner/locales/pl.yml +59 -0
  50. data/cleaner/locales/pt-br.yml +68 -0
  51. data/cleaner/locales/pt.yml +67 -0
  52. data/cleaner/locales/ru.yml +78 -0
  53. data/cleaner/locales/sv.yml +68 -0
  54. data/cleaner/locales/ta.yml +75 -0
  55. data/cleaner/locales/uk.yml +76 -0
  56. data/cleaner/locales/ur.yml +80 -0
  57. data/cleaner/locales/zh-cn.yml +68 -0
  58. data/cleaner/locales/zh-tw.yml +68 -0
  59. data/cleaner/views/_footer.erb +20 -0
  60. data/cleaner/views/_job_info.erb +88 -0
  61. data/cleaner/views/_nav.erb +52 -0
  62. data/cleaner/views/_paging.erb +23 -0
  63. data/cleaner/views/_poll_link.erb +7 -0
  64. data/cleaner/views/_status.erb +4 -0
  65. data/cleaner/views/_summary.erb +40 -0
  66. data/cleaner/views/busy.erb +98 -0
  67. data/cleaner/views/dashboard.erb +75 -0
  68. data/cleaner/views/dead.erb +34 -0
  69. data/cleaner/views/errors.erb +84 -0
  70. data/cleaner/views/layout.erb +40 -0
  71. data/cleaner/views/morgue.erb +75 -0
  72. data/cleaner/views/queue.erb +46 -0
  73. data/cleaner/views/queues.erb +30 -0
  74. data/cleaner/views/retries.erb +80 -0
  75. data/cleaner/views/retry.erb +34 -0
  76. data/cleaner/views/scheduled.erb +54 -0
  77. data/cleaner/views/scheduled_job_info.erb +8 -0
  78. data/cleaner-stats.png +0 -0
  79. data/cleaner.png +0 -0
  80. data/code_of_conduct.md +50 -0
  81. data/lib/generators/sidekiq/templates/worker.rb.erb +9 -0
  82. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +6 -0
  83. data/lib/generators/sidekiq/templates/worker_test.rb.erb +8 -0
  84. data/lib/generators/sidekiq/worker_generator.rb +49 -0
  85. data/lib/sidekiq/api.rb +940 -0
  86. data/lib/sidekiq/cleaner/action.rb +89 -0
  87. data/lib/sidekiq/cleaner/application.rb +385 -0
  88. data/lib/sidekiq/cleaner/helpers.rb +325 -0
  89. data/lib/sidekiq/cleaner/router.rb +100 -0
  90. data/lib/sidekiq/cleaner.rb +214 -0
  91. data/lib/sidekiq/cli.rb +445 -0
  92. data/lib/sidekiq/client.rb +243 -0
  93. data/lib/sidekiq/core_ext.rb +1 -0
  94. data/lib/sidekiq/ctl.rb +221 -0
  95. data/lib/sidekiq/delay.rb +42 -0
  96. data/lib/sidekiq/exception_handler.rb +29 -0
  97. data/lib/sidekiq/extensions/action_mailer.rb +57 -0
  98. data/lib/sidekiq/extensions/active_record.rb +40 -0
  99. data/lib/sidekiq/extensions/class_methods.rb +40 -0
  100. data/lib/sidekiq/extensions/generic_proxy.rb +31 -0
  101. data/lib/sidekiq/fetch.rb +81 -0
  102. data/lib/sidekiq/job_logger.rb +25 -0
  103. data/lib/sidekiq/job_retry.rb +262 -0
  104. data/lib/sidekiq/launcher.rb +173 -0
  105. data/lib/sidekiq/logging.rb +122 -0
  106. data/lib/sidekiq/manager.rb +137 -0
  107. data/lib/sidekiq/middleware/chain.rb +150 -0
  108. data/lib/sidekiq/middleware/i18n.rb +42 -0
  109. data/lib/sidekiq/middleware/server/active_record.rb +23 -0
  110. data/lib/sidekiq/paginator.rb +43 -0
  111. data/lib/sidekiq/processor.rb +279 -0
  112. data/lib/sidekiq/rails.rb +58 -0
  113. data/lib/sidekiq/redis_connection.rb +144 -0
  114. data/lib/sidekiq/scheduled.rb +174 -0
  115. data/lib/sidekiq/testing/inline.rb +29 -0
  116. data/lib/sidekiq/testing.rb +333 -0
  117. data/lib/sidekiq/util.rb +66 -0
  118. data/lib/sidekiq/version.rb +4 -0
  119. data/lib/sidekiq/worker.rb +220 -0
  120. data/lib/sidekiq.rb +237 -0
  121. data/sidekiq_cleaner.gemspec +21 -0
  122. metadata +235 -0
@@ -0,0 +1,75 @@
1
+ <script type="text/javascript" src="<%= root_path %>javascripts/dashboard.js"></script>
2
+ <div class= "dashboard clearfix">
3
+ <h3 >
4
+ <%= t('Dashboard') %>
5
+ <span class="beacon">
6
+ <span class="ring"></span>
7
+ <span class="dot"></span>
8
+ </span>
9
+ </h3>
10
+ <div class="interval-slider ltr">
11
+ <span class="interval-slider-label"><%= t('PollingInterval') %>:</span>
12
+ <span class="current-interval">5 sec</span>
13
+ <br/>
14
+ <input type="range" min="2000" max="20000" step="1000" value="5000"/>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="row chart">
19
+ <div id="realtime" data-processed-label="<%= t('Processed') %>" data-failed-label="<%= t('Failed') %>"></div>
20
+ <div id="realtime-legend"></div>
21
+ </div>
22
+
23
+ <div class="row chart">
24
+ <h5>
25
+ <span class="history-heading"><%= t('History') %></span>
26
+ <a href="<%= root_path %>?days=7" class="history-graph <%= "active" if params[:days] == "7" %>"><%= t('OneWeek') %></a>
27
+ <a href="<%= root_path %>" class="history-graph <%= "active" if params[:days].nil? || params[:days] == "30" %>"><%= t('OneMonth') %></a>
28
+ <a href="<%= root_path %>?days=90" class="history-graph <%= "active" if params[:days] == "90" %>"><%= t('ThreeMonths') %></a>
29
+ <a href="<%= root_path %>?days=180" class="history-graph <%= "active" if params[:days] == "180" %>"><%= t('SixMonths') %></a>
30
+ </h5>
31
+
32
+ <div id="history" data-processed-label="<%= t('Processed') %>" data-failed-label="<%= t('Failed') %>" data-processed="<%= h Sidekiq.dump_json(@processed_history) %>" data-failed="<%= h Sidekiq.dump_json(@failed_history) %>" data-update-url="<%= root_path %>stats"></div>
33
+ <div id="history-legend"></div>
34
+ </div>
35
+
36
+ <br/>
37
+ <h5>HI MOM</h5>
38
+ <div class="redis-wrapper">
39
+ <div class="stats-container">
40
+ <% if @redis_info.fetch("redis_version", nil) %>
41
+ <div class="stat">
42
+ <h3 class="redis_version"><%= @redis_info.fetch("redis_version") %></h3>
43
+ <p><%= t('Version') %></p>
44
+ </div>
45
+ <% end %>
46
+
47
+ <% if @redis_info.fetch("uptime_in_days", nil) %>
48
+ <div class="stat">
49
+ <h3 class="uptime_in_days"><%= @redis_info.fetch("uptime_in_days") %></h3>
50
+ <p><%= t('Uptime') %></p>
51
+ </div>
52
+ <% end %>
53
+
54
+ <% if @redis_info.fetch("connected_clients", nil) %>
55
+ <div class="stat">
56
+ <h3 class="connected_clients"><%= @redis_info.fetch("connected_clients") %></h3>
57
+ <p><%= t('Connections') %></p>
58
+ </div>
59
+ <% end %>
60
+
61
+ <% if @redis_info.fetch("used_memory_human", nil) %>
62
+ <div class="stat">
63
+ <h3 class="used_memory_human"><%= @redis_info.fetch("used_memory_human") %></h3>
64
+ <p><%= t('MemoryUsage') %></p>
65
+ </div>
66
+ <% end %>
67
+
68
+ <% if @redis_info.fetch("used_memory_peak_human", nil) %>
69
+ <div class="stat">
70
+ <h3 class="used_memory_peak_human"><%= @redis_info.fetch("used_memory_peak_human") %></h3>
71
+ <p><%= t('PeakMemoryUsage') %></p>
72
+ </div>
73
+ <% end %>
74
+ </div>
75
+ </div>
@@ -0,0 +1,34 @@
1
+ <%= erb :_job_info, locals: { job: @dead, type: :dead } %>
2
+
3
+ <h3><%= t('Error') %></h3>
4
+ <div class="table_container">
5
+ <table class="error table table-bordered table-striped">
6
+ <tbody>
7
+ <tr>
8
+ <th><%= t('ErrorClass') %></th>
9
+ <td>
10
+ <code><%= @dead['error_class'] %></code>
11
+ </td>
12
+ </tr>
13
+ <tr>
14
+ <th><%= t('ErrorMessage') %></th>
15
+ <td><%= h(@dead['error_message']) %></td>
16
+ </tr>
17
+ <% if !@dead['error_backtrace'].nil? %>
18
+ <tr>
19
+ <th><%= t('ErrorBacktrace') %></th>
20
+ <td>
21
+ <code><%= @dead['error_backtrace'].join("<br/>") %></code>
22
+ </td>
23
+ </tr>
24
+ <% end %>
25
+ </tbody>
26
+ </table>
27
+ </div>
28
+
29
+ <form class="form-horizontal" action="<%= root_path %>morgue/<%= job_params(@dead, @dead.score) %>" method="post">
30
+ <%= csrf_tag %>
31
+ <a class="btn btn-default" href="<%= root_path %>morgue"><%= t('GoBack') %></a>
32
+ <input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
33
+ <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
34
+ </form>
@@ -0,0 +1,84 @@
1
+ <header class="row">
2
+ <div class="col-sm-5">
3
+ <h3><%= t('Errors') %></h3>
4
+ </div>
5
+ </header>
6
+
7
+ <% if @group_by_class.size > 0 && @group_by_exception.size > 0 %>
8
+ <h2>Group by Class</h2>
9
+ <div>
10
+ <%= csrf_tag %>
11
+ <div class="table_container">
12
+ <table class="table table-striped table-bordered table-white">
13
+ <thead>
14
+ <tr>
15
+ <th><%= t('Class') %></th>
16
+ <th><%= t('Failed') %></th>
17
+ <th><%= t('RetryAll') %></th>
18
+ <th><%= t('DeleteAll') %></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <% @group_by_class.each do |k, v| %>
23
+ <tr>
24
+ <td> <%= k %> </td>
25
+ <td> <%= v.count %> </td>
26
+ <td>
27
+ <form action="<%= root_path %>errors/retry" method="post">
28
+ <%= csrf_tag %>
29
+ <input class="btn btn-danger btn-xs pull-right flip class-cleaner-retry-button" type="submit" name="retry_error_class" value="Retry" data_name="<%= k %>" />
30
+ </form>
31
+ </td>
32
+ <td>
33
+ <form action="<%= root_path %>errors/delete" method="post">
34
+ <%= csrf_tag %>
35
+ <input class="btn btn-danger btn-xs pull-right flip class-cleaner-delete-button" type="submit" name="delete_error_class" value="Delete" data_name="<%= k %>" />
36
+ </form>
37
+ </td>
38
+ </tr>
39
+ <% end %>
40
+ </tbody>
41
+ </table>
42
+ </div>
43
+ </div>
44
+
45
+ <h2>Group by Exception</h2>
46
+ <div>
47
+ <%= csrf_tag %>
48
+ <div class="table_container">
49
+ <table class="table table-striped table-bordered table-white">
50
+ <thead>
51
+ <tr>
52
+ <th><%= t('Exception') %></th>
53
+ <th><%= t('Failed') %></th>
54
+ <th><%= t('RetryAll') %></th>
55
+ <th><%= t('DeleteAll') %></th>
56
+ </tr>
57
+ </thead>
58
+ <tbody>
59
+ <% @group_by_exception.each do |k, v| %>
60
+ <tr>
61
+ <td> <%= k %> </td>
62
+ <td> <%= v.count %> </td>
63
+ <td>
64
+ <form action="<%= root_path %>errors/retry" method="post">
65
+ <%= csrf_tag %>
66
+ <input class="btn btn-danger btn-xs pull-right flip exception-cleaner-retry-button" type="submit" name="retry_error_exception" value="Retry" data_name="<%= k %>" />
67
+ </form>
68
+ </td>
69
+ <td>
70
+ <form action="<%= root_path %>errors/delete" method="post">
71
+ <%= csrf_tag %>
72
+ <input class="btn btn-danger btn-xs pull-right flip exception-cleaner-delete-button" type="submit" name="delete_error_exception" value="Delete" data_name="<%= k %>" />
73
+ </form>
74
+ </td>
75
+ </tr>
76
+ <% end %>
77
+ </tbody>
78
+ </table>
79
+ </div>
80
+ </div>
81
+
82
+ <% else %>
83
+ <div class="alert alert-success"><%= t('NoDeadJobsFound') %></div>
84
+ <% end %>
@@ -0,0 +1,40 @@
1
+ <!doctype html>
2
+ <html dir="<%= text_direction %>">
3
+ <head>
4
+ <title><%= environment_title_prefix %><%= Sidekiq::NAME %></title>
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
+
8
+ <link href="<%= root_path %>stylesheets/bootstrap.css" media="screen" rel="stylesheet" type="text/css" />
9
+ <% if rtl? %>
10
+ <link href="<%= root_path %>stylesheets/bootstrap-rtl.min.css" media="screen" rel="stylesheet" type="text/css"/>
11
+ <% end %>
12
+
13
+ <link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />
14
+ <% if rtl? %>
15
+ <link href="<%= root_path %>stylesheets/application-rtl.css" media="screen" rel="stylesheet" type="text/css" />
16
+ <% end %>
17
+
18
+ <link rel="shortcut icon" type="image/ico" href="<%= root_path %>images/favicon.ico" />
19
+ <script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
20
+ <meta name="google" content="notranslate" />
21
+ <%= display_custom_head %>
22
+ </head>
23
+ <body class="admin" data-poll-path="<%= poll_path %>" data-locale="<%= locale %>">
24
+ <%= erb :_nav %>
25
+ <div id="page">
26
+ <div class="container">
27
+ <div class="row">
28
+ <div class="col-sm-12 summary_bar">
29
+ <%= erb :_summary %>
30
+ </div>
31
+
32
+ <div class="col-sm-12">
33
+ <%= yield %>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <%= erb :_footer %>
39
+ </body>
40
+ </html>
@@ -0,0 +1,75 @@
1
+ <header class="row">
2
+ <div class="col-sm-5">
3
+ <h3><%= t('DeadJobs') %></h3>
4
+ </div>
5
+ <% if @dead.size > 0 && @total_size > @count %>
6
+ <div class="col-sm-4">
7
+ <%= erb :_paging, locals: { url: "#{root_path}morgue" } %>
8
+ </div>
9
+ <% end %>
10
+ <%= filtering('dead') %>
11
+ </header>
12
+
13
+ <% if @dead.size > 0 %>
14
+ <form action="<%= root_path %>morgue" method="post">
15
+ <%= csrf_tag %>
16
+ <div class="table_container">
17
+ <table class="table table-striped table-bordered table-white">
18
+ <thead>
19
+ <tr>
20
+ <th class="table-checkbox checkbox-column">
21
+ <label>
22
+ <input type="checkbox" class="check_all" />
23
+ </label>
24
+ </th>
25
+ <th><%= t('LastRetry') %></th>
26
+ <th><%= t('Queue') %></th>
27
+ <th><%= t('Job') %></th>
28
+ <th><%= t('Arguments') %></th>
29
+ <th><%= t('Error') %></th>
30
+ </tr>
31
+ </thead>
32
+ <% @dead.each do |entry| %>
33
+ <tr>
34
+ <td class="table-checkbox">
35
+ <label>
36
+ <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
37
+ </label>
38
+ </td>
39
+ <td>
40
+ <a href="<%= root_path %>morgue/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
41
+ </td>
42
+ <td>
43
+ <a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
44
+ </td>
45
+ <td><%= entry.display_class %></td>
46
+ <td>
47
+ <div class="args"><%= display_args(entry.display_args) %></div>
48
+ </td>
49
+ <td>
50
+ <% if entry.error? %>
51
+ <div><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></div>
52
+ <% end %>
53
+ </td>
54
+ </tr>
55
+ <% end %>
56
+ </table>
57
+ </div>
58
+ <input class="btn btn-primary btn-xs pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
59
+ <input class="btn btn-danger btn-xs pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
60
+ </form>
61
+
62
+ <% unfiltered? do %>
63
+ <form action="<%= root_path %>morgue/all/delete" method="post">
64
+ <%= csrf_tag %>
65
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
66
+ </form>
67
+ <form action="<%= root_path %>morgue/all/retry" method="post">
68
+ <%= csrf_tag %>
69
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
70
+ </form>
71
+ <% end %>
72
+
73
+ <% else %>
74
+ <div class="alert alert-success"><%= t('NoDeadJobsFound') %></div>
75
+ <% end %>
@@ -0,0 +1,46 @@
1
+ <header class="row">
2
+ <div class="col-sm-5">
3
+ <h3>
4
+ <%= t('CurrentMessagesInQueue', :queue => h(@name)) %>
5
+ <% if @queue.paused? %>
6
+ <span class="label label-danger"><%= t('Paused') %></span>
7
+ <% end %>
8
+ <span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
9
+ </h3>
10
+ </div>
11
+ <div class="col-sm-4 pull-right flip">
12
+ <%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
13
+ </div>
14
+ </header>
15
+ <div class="table_container">
16
+ <table class="queue table table-hover table-bordered table-striped">
17
+ <thead>
18
+ <th><%= t('Job') %></th>
19
+ <th><%= t('Arguments') %></th>
20
+ <th></th>
21
+ </thead>
22
+ <% @messages.each_with_index do |msg, index| %>
23
+ <tr>
24
+ <td><%= h(msg.display_class) %></td>
25
+ <td>
26
+ <% a = msg.display_args %>
27
+ <% if a.inspect.size > 100 %>
28
+ <span class="worker_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
29
+ <button data-toggle="collapse" data-target=".worker_<%= index %>" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
30
+ <div class="toggle worker_<%= index %>"><%= display_args(a) %></div>
31
+ <% else %>
32
+ <%= display_args(msg.display_args) %>
33
+ <% end %>
34
+ </td>
35
+ <td>
36
+ <form action="<%= root_path %>queues/<%= CGI.escape(@name) %>/delete" method="post">
37
+ <%= csrf_tag %>
38
+ <input name="key_val" value="<%= h msg.value %>" type="hidden" />
39
+ <input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
40
+ </form>
41
+ </td>
42
+ </tr>
43
+ <% end %>
44
+ </table>
45
+ </div>
46
+ <%= erb :_paging, locals: { url: "#{root_path}queues/#{@name}" } %>
@@ -0,0 +1,30 @@
1
+ <h3><%= t('Queues') %></h3>
2
+
3
+ <div class="table_container">
4
+ <table class="queues table table-hover table-bordered table-striped table-white">
5
+ <thead>
6
+ <th><%= t('Queue') %></th>
7
+ <th><%= t('Size') %></th>
8
+ <th><%= t('Latency') %></th>
9
+ <th><%= t('Actions') %></th>
10
+ </thead>
11
+ <% @queues.each do |queue| %>
12
+ <tr>
13
+ <td>
14
+ <a href="<%= root_path %>queues/<%= CGI.escape(queue.name) %>"><%= h queue.name %></a>
15
+ <% if queue.paused? %>
16
+ <span class="label label-danger"><%= t('Paused') %></span>
17
+ <% end %>
18
+ </td>
19
+ <td><%= number_with_delimiter(queue.size) %> </td>
20
+ <td><% queue_latency = queue.latency %><%= number_with_delimiter(queue_latency.round(2)) %><%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %> </td>
21
+ <td class="delete-confirm">
22
+ <form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
23
+ <%= csrf_tag %>
24
+ <input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
25
+ </form>
26
+ </td>
27
+ </tr>
28
+ <% end %>
29
+ </table>
30
+ </div>
@@ -0,0 +1,80 @@
1
+ <header class="row">
2
+ <div class="col-sm-5">
3
+ <h3><%= t('Retries') %></h3>
4
+ </div>
5
+ <% if @retries.size > 0 && @total_size > @count %>
6
+ <div class="col-sm-4">
7
+ <%= erb :_paging, locals: { url: "#{root_path}retries" } %>
8
+ </div>
9
+ <% end %>
10
+ <%= filtering('retries') %>
11
+ </header>
12
+
13
+ <% if @retries.size > 0 %>
14
+ <form action="<%= root_path %>retries" method="post">
15
+ <%= csrf_tag %>
16
+ <div class="table_container">
17
+ <table class="table table-striped table-bordered table-white">
18
+ <thead>
19
+ <tr>
20
+ <th class="table-checkbox checkbox-column">
21
+ <label>
22
+ <input type="checkbox" class="check_all" />
23
+ </label>
24
+ </th>
25
+ <th><%= t('NextRetry') %></th>
26
+ <th><%= t('RetryCount') %></th>
27
+ <th><%= t('Queue') %></th>
28
+ <th><%= t('Job') %></th>
29
+ <th><%= t('Arguments') %></th>
30
+ <th><%= t('Error') %></th>
31
+ </tr>
32
+ </thead>
33
+ <% @retries.each do |entry| %>
34
+ <tr>
35
+ <td class="table-checkbox">
36
+ <label>
37
+ <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
38
+ </label>
39
+ </td>
40
+ <td>
41
+ <a href="<%= root_path %>retries/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
42
+ </td>
43
+ <td><%= entry['retry_count'] %></td>
44
+ <td>
45
+ <a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
46
+ </td>
47
+ <td><%= entry.display_class %></td>
48
+ <td>
49
+ <div class="args"><%= display_args(entry.display_args) %></div>
50
+ </td>
51
+ <td>
52
+ <div><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></div>
53
+ </td>
54
+ </tr>
55
+ <% end %>
56
+ </table>
57
+ </div>
58
+ <input class="btn btn-primary btn-xs pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
59
+ <input class="btn btn-danger btn-xs pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
60
+ <input class="btn btn-danger btn-xs pull-left flip" type="submit" name="kill" value="<%= t('Kill') %>" />
61
+ </form>
62
+
63
+ <% unfiltered? do %>
64
+ <form action="<%= root_path %>retries/all/delete" method="post">
65
+ <%= csrf_tag %>
66
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
67
+ </form>
68
+ <form action="<%= root_path %>retries/all/retry" method="post">
69
+ <%= csrf_tag %>
70
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
71
+ </form>
72
+ <form action="<%= root_path %>retries/all/kill" method="post">
73
+ <%= csrf_tag %>
74
+ <input class="btn btn-danger btn-xs pull-right flip" type="submit" name="kill" value="<%= t('KillAll') %>" data-confirm="<%= t('AreYouSure') %>" />
75
+ </form>
76
+ <% end %>
77
+
78
+ <% else %>
79
+ <div class="alert alert-success"><%= t('NoRetriesFound') %></div>
80
+ <% end %>
@@ -0,0 +1,34 @@
1
+ <%= erb :_job_info, locals: { job: @retry, type: :retry } %>
2
+
3
+ <h3><%= t('Error') %></h3>
4
+ <div class="table_container">
5
+ <table class="error table table-bordered table-striped">
6
+ <tbody>
7
+ <tr>
8
+ <th><%= t('ErrorClass') %></th>
9
+ <td>
10
+ <code><%= h @retry['error_class'] %></code>
11
+ </td>
12
+ </tr>
13
+ <tr>
14
+ <th><%= t('ErrorMessage') %></th>
15
+ <td><%= h(@retry['error_message']) %></td>
16
+ </tr>
17
+ <% if !@retry['error_backtrace'].nil? %>
18
+ <tr>
19
+ <th><%= t('ErrorBacktrace') %></th>
20
+ <td>
21
+ <code><%= @retry['error_backtrace'].join("<br/>") %></code>
22
+ </td>
23
+ </tr>
24
+ <% end %>
25
+ </tbody>
26
+ </table>
27
+ </div>
28
+
29
+ <form class="form-horizontal" action="<%= root_path %>retries/<%= job_params(@retry, @retry.score) %>" method="post">
30
+ <%= csrf_tag %>
31
+ <a class="btn btn-default" href="<%= root_path %>retries"><%= t('GoBack') %></a>
32
+ <input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
33
+ <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
34
+ </form>
@@ -0,0 +1,54 @@
1
+ <header class="row">
2
+ <div class="col-sm-5">
3
+ <h3><%= t('ScheduledJobs') %></h3>
4
+ </div>
5
+ <% if @scheduled.size > 0 && @total_size > @count %>
6
+ <div class="col-sm-4">
7
+ <%= erb :_paging, locals: { url: "#{root_path}scheduled" } %>
8
+ </div>
9
+ <% end %>
10
+ <%= filtering('scheduled') %>
11
+ </header>
12
+
13
+ <% if @scheduled.size > 0 %>
14
+
15
+ <form action="<%= root_path %>scheduled" method="post">
16
+ <%= csrf_tag %>
17
+ <div class="table_container">
18
+ <table class="table table-striped table-bordered table-white">
19
+ <thead>
20
+ <tr>
21
+ <th class="checkbox-column">
22
+ <input type="checkbox" class="check_all" />
23
+ </th>
24
+ <th><%= t('When') %></th>
25
+ <th><%= t('Queue') %></th>
26
+ <th><%= t('Job') %></th>
27
+ <th><%= t('Arguments') %></th>
28
+ </tr>
29
+ </thead>
30
+ <% @scheduled.each do |entry| %>
31
+ <tr>
32
+ <td>
33
+ <input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' />
34
+ </td>
35
+ <td>
36
+ <a href="<%= root_path %>scheduled/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
37
+ </td>
38
+ <td>
39
+ <a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
40
+ </td>
41
+ <td><%= entry.display_class %></td>
42
+ <td>
43
+ <div class="args"><%= display_args(entry.display_args) %></div>
44
+ </td>
45
+ </tr>
46
+ <% end %>
47
+ </table>
48
+ </div>
49
+ <input class="btn btn-danger pull-right flip" type="submit" name="delete" value="<%= t('Delete') %>" />
50
+ <input class="btn btn-danger pull-right flip" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
51
+ </form>
52
+ <% else %>
53
+ <div class="alert alert-success"><%= t('NoScheduledFound') %></div>
54
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%= erb :_job_info, locals: { job: @job, type: :scheduled } %>
2
+
3
+ <form class="form-horizontal" action="<%= root_path %>scheduled/<%= job_params(@job, @job.score) %>" method="post">
4
+ <%= csrf_tag %>
5
+ <a class="btn btn-default" href="<%= root_path %>scheduled"><%= t('GoBack') %></a>
6
+ <input class="btn btn-primary" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
7
+ <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
8
+ </form>
data/cleaner-stats.png ADDED
Binary file
data/cleaner.png ADDED
Binary file
@@ -0,0 +1,50 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This Code of Conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting the project maintainer at mperham AT gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+
45
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
46
+ version 1.3.0, available at
47
+ [http://contributor-covenant.org/version/1/3/0/][version]
48
+
49
+ [homepage]: http://contributor-covenant.org
50
+ [version]: http://contributor-covenant.org/version/1/3/0/
@@ -0,0 +1,9 @@
1
+ <% module_namespacing do -%>
2
+ class <%= class_name %>Worker
3
+ include Sidekiq::Worker
4
+
5
+ def perform(*args)
6
+ # Do something
7
+ end
8
+ end
9
+ <% end -%>
@@ -0,0 +1,6 @@
1
+ require 'rails_helper'
2
+ <% module_namespacing do -%>
3
+ RSpec.describe <%= class_name %>Worker, type: :worker do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
6
+ <% end -%>
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+ <% module_namespacing do -%>
3
+ class <%= class_name %>WorkerTest < <% if defined? Minitest::Test %>Minitest::Test<% else %>MiniTest::Unit::TestCase<% end %>
4
+ def test_example
5
+ skip "add some examples to (or delete) #{__FILE__}"
6
+ end
7
+ end
8
+ <% end -%>