app/views/test.erb
<p>
<ul style="list-style: square;">
<li><a href="sidekiq">Sidekiq Dashboard</a></li>
<li><a href="test">Refresh page</a></li>
</ul>
</p>
<p>
When the background jobs are running, the message posted from this form
should appear below within a few seconds. If they do not appear, do not
keep adding messages because they are likely already in the job queue. The
queue can be viewed from the <a href="sidekiq">Sidekiq Dashboard</a>. To
see the messages on this test page, ensure the background jobs are running:
<pre><code>
bundle exec sidekiq -d -C config/sidekiq.yml -r ./config/initializers/sidekiq.rb
</code></pre>
When the background jobs are running, the messages will be processed from
the queue and they will appear here after you <a href="test">Refresh page</a>.
</p>
<h3>Sidekiq Tests</h3>
<table>
<tr>
<td>
<form method="post" action="msg">
<input type="submit" value="Add Timestamp">
</form>
</td>
<td>
<form method="post" action="msg/clear">
<input type="submit" value="Clear Timestamps">
</form>
</td>
<td>
<form method="post" action="msg/fail">
<input type="submit" value="Test Failure" style="color: red">
</form>
</td>
</tr>
</table>
<h3>Sidekiq Stats</h3>
<table>
<tr><td>Enqueued:</td><td><%= @stats.enqueued %></td></tr>
<tr><td>Failed:</td><td><%= @stats.failed %></td></tr>
<tr><td>Processed:</td><td><%= @stats.processed %></td></tr>
</table>
<h3>Timestamps Processed</h3>
<% @messages.each do |msg| %>
<p><%= msg %></p>
<% end %>