attentive_sidekiq 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 710aa8d08d27aece645bef61d22be38bdf5424f5
4
- data.tar.gz: e8dde883933212b7ea5659749d12cb810005bc2d
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWQyZTM3NDdkMzM4ODFhYjMyYWFlMDRjY2EwOWQxOGZjMTQ5MGNlYg==
5
+ data.tar.gz: !binary |-
6
+ NmE3MTliMjY0ZDJiZmFmOWMxYjU4ZTRiZjcyZTU0ZTNjMTRjM2M2OA==
5
7
  SHA512:
6
- metadata.gz: fd6587c4312f1e2cf96cf2bc106f509c3464f871fcb8acd08faf031ad1dd207d85ddac21d9e5eacde83dcb7e8a96f162238801d497d88bab6b284977e8775e27
7
- data.tar.gz: 629fb700fca7a68df8054624a648319db57feb9a0f154a4a7b38a6c5a2b87df3f09888f2e13c8474455d91ffdb2956c9935741ea54288968d9267a71821cbeff
8
+ metadata.gz: !binary |-
9
+ MzAyMGIzZGNkNzczZGNjOTNjNGVkNTdiNjA3ODdjOTc3NWQ3YzhlODBhZDU1
10
+ MzM3YmI4NjEwYzc2YmQ1NGExNmVlNDcyZjUzNGU3ZTE2NzA4MjNmYTY5N2U3
11
+ ZmIxYWFlNGI3Yjg1MzNlOTEzN2Y1MjMwMDE0M2I3NDgwMGQ1ZTY=
12
+ data.tar.gz: !binary |-
13
+ MzM5Nzg3YTc0MGM3MzlhMTFhODY5OTdjYmYwZDAzZGRiMGIxZTUxMzI4MmY5
14
+ YmU1YzZiMWZjNWQ5ZjQzZDZhOGNkMmI3NWZlNzRjOGRmMzZiM2I5NWFlY2Ji
15
+ MzFiMDkxYzEyZDg4YzVkZjYyNDAwNTc1MjBmMWJiNWQxNzU3NDk=
data/Gemfile.lock CHANGED
@@ -8,18 +8,18 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.0.0.1)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ activesupport (4.2.8)
13
12
  i18n (~> 0.7)
14
13
  minitest (~> 5.1)
14
+ thread_safe (~> 0.3, >= 0.3.4)
15
15
  tzinfo (~> 1.1)
16
16
  byebug (9.0.6)
17
17
  coderay (1.1.1)
18
- concurrent-ruby (1.0.2)
19
- connection_pool (2.2.1)
18
+ concurrent-ruby (1.0.5)
19
+ connection_pool (2.2.0)
20
20
  i18n (0.7.0)
21
21
  method_source (0.8.2)
22
- minitest (5.9.1)
22
+ minitest (5.10.1)
23
23
  minitest-stub_any_instance (1.0.1)
24
24
  pry (0.10.4)
25
25
  coderay (~> 1.1.0)
@@ -28,22 +28,22 @@ GEM
28
28
  pry-byebug (3.4.0)
29
29
  byebug (~> 9.0)
30
30
  pry (~> 0.10)
31
- rack (2.0.1)
31
+ rack (1.6.5)
32
32
  rack-protection (1.5.3)
33
33
  rack
34
34
  rack-test (0.6.3)
35
35
  rack (>= 1.0)
36
36
  rake (11.3.0)
37
- redis (3.3.1)
37
+ redis (3.3.2)
38
38
  redis-namespace (1.5.2)
39
39
  redis (~> 3.0, >= 3.0.4)
40
- sidekiq (4.2.5)
40
+ sidekiq (4.2.3)
41
41
  concurrent-ruby (~> 1.0)
42
42
  connection_pool (~> 2.2, >= 2.2.0)
43
43
  rack-protection (>= 1.5.0)
44
44
  redis (~> 3.2, >= 3.2.1)
45
45
  slop (3.6.0)
46
- thread_safe (0.3.5)
46
+ thread_safe (0.3.6)
47
47
  tzinfo (1.2.2)
48
48
  thread_safe (~> 0.1)
49
49
 
@@ -60,6 +60,3 @@ DEPENDENCIES
60
60
  rake (~> 11.3)
61
61
  redis-namespace (~> 1.5)
62
62
  sidekiq (~> 4.2)
63
-
64
- BUNDLED WITH
65
- 1.13.6
@@ -1,3 +1,3 @@
1
1
  module AttentiveSidekiq
2
- VERSION = "0.3.0"
2
+ VERSION = '0.3.1'.freeze
3
3
  end
@@ -8,6 +8,21 @@ module AttentiveSidekiq
8
8
  erb File.read(File.join(VIEW_PATH, 'disappeared-list.erb'))
9
9
  end
10
10
 
11
+ app.post("/disappeared-jobs/requeue-all") do
12
+ AttentiveSidekiq::Disappeared.jobs.each do |job|
13
+ next if job['status'] # Skip already reenqueued jobs
14
+ AttentiveSidekiq::Disappeared.requeue(job['jid'])
15
+ end
16
+ redirect "#{root_path}disappeared-jobs"
17
+ end
18
+
19
+ app.post("/disappeared-jobs/delete-all") do
20
+ AttentiveSidekiq::Disappeared.jobs.each do |job|
21
+ AttentiveSidekiq::Disappeared.remove(job['jid'])
22
+ end
23
+ redirect "#{root_path}disappeared-jobs"
24
+ end
25
+
11
26
  app.post("/disappeared-jobs/:jid/delete") do
12
27
  AttentiveSidekiq::Disappeared.remove(params['jid'])
13
28
  redirect "#{root_path}disappeared-jobs"
@@ -17,7 +32,6 @@ module AttentiveSidekiq
17
32
  AttentiveSidekiq::Disappeared.requeue(params['jid'])
18
33
  redirect "#{root_path}disappeared-jobs"
19
34
  end
20
-
21
35
  end
22
36
  end
23
37
  end
@@ -0,0 +1,22 @@
1
+ cs:
2
+ jid: JID
3
+ queue: Název fronty
4
+ class: Název třídy
5
+ arguments: Argumenty
6
+ disappeared_jobs: Ztracené úkoly
7
+ created_at: Vytvořeno
8
+ noticed_at: Noticed disappeared at
9
+ noticed_unknown: neznámý čas
10
+ actions: Akce
11
+ delete: Smazat
12
+ delete_confirmation: Jste si jisti, že chcete smazat tento záznam?
13
+ status: Stav
14
+ detected: Detekováno
15
+ requeued: Znovu zařazeno
16
+ requeue: Zařadit znovu
17
+ requeue_confirmation: Jste si jisti, že chcete tento úkol znovu zařadit?
18
+ delete_all: Smazat vše
19
+ requeue_all: Zařadit vše znovu
20
+ delete_all_confirmation: Jste si jisti, že chcete smazat všechny ztracené úkoly?
21
+ requeue_all_confirmation: Jste si jisti, že chcete znovu zařadit všechny ztracené úkoly?
22
+ no_disappeared_jobs: Nebyly nalezeny žádné ztracené úkoly.
@@ -15,3 +15,8 @@ en:
15
15
  requeued: Requeued
16
16
  requeue: Requeue
17
17
  requeue_confirmation: Are you sure you want to requeue this job?
18
+ delete_all: Delete all
19
+ requeue_all: Requeue all
20
+ delete_all_confirmation: Are you sure you want to delete all disappeared jobs?
21
+ requeue_all_confirmation: Are you sure you want to requeue all disappeared jobs?
22
+ no_disappeared_jobs: No dissapeared jobs.
@@ -1,44 +1,58 @@
1
1
  <h3><%= t('disappeared_jobs') %></h3>
2
2
 
3
- <div class="table_container">
4
- <table class="table table-hover table-bordered table-striped table-white">
5
- <thead>
6
- <tr>
7
- <th><%= t('jid') %></th>
8
- <th><%= t('queue') %></th>
9
- <th><%= t('class') %></th>
10
- <th><%= t('arguments') %></th>
11
- <th><%= t('created_at') %></th>
12
- <th><%= t('noticed_at') %></th>
13
- <th><%= t('status') %></th>
14
- <th><%= t('actions') %></th>
15
- </tr>
16
- </thead>
17
-
18
- <tbody>
19
- <% @disappeared_jobs.each do |job| %>
3
+ <% if @disappeared_jobs.count > 0 %>
4
+ <div class="table_container">
5
+ <table class="table table-hover table-bordered table-striped table-white">
6
+ <thead>
20
7
  <tr>
21
- <td><%= job['jid'] %></td>
22
- <td><%= job['queue'] %></td>
23
- <td><%= job['class'] %></td>
24
- <td><%= job['args'] %></td>
25
- <td><%= Time.at(job['created_at']).strftime("%H:%M:%S %d.%m.%Y %z") %></td>
26
- <td><%= job['noticed_at'] ? Time.at(job['noticed_at']).strftime("%H:%M:%S %d.%m.%Y %z") : t("noticed_unknown") %></td>
27
- <th><%= job['status'] ? t(job['status']) : t('detected') %></th>
28
- <td>
29
- <form action="<%= "#{root_path}disappeared-jobs/#{job['jid']}/delete" %>" method="post">
30
- <%= csrf_tag %>
31
- <input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('delete') %>" style="width:100%" data-confirm="<%= t('delete_confirmation') %>" />
32
- </form>
33
- <% if job['status'] != AttentiveSidekiq::Disappeared::STATUS_REQUEUED %>
34
- <form action="<%= "#{root_path}disappeared-jobs/#{job['jid']}/requeue" %>" method="post">
8
+ <th><%= t('jid') %></th>
9
+ <th><%= t('queue') %></th>
10
+ <th><%= t('class') %></th>
11
+ <th><%= t('arguments') %></th>
12
+ <th><%= t('created_at') %></th>
13
+ <th><%= t('noticed_at') %></th>
14
+ <th><%= t('status') %></th>
15
+ <th><%= t('actions') %></th>
16
+ </tr>
17
+ </thead>
18
+
19
+ <tbody>
20
+ <% @disappeared_jobs.each do |job| %>
21
+ <tr>
22
+ <td><%= job['jid'] %></td>
23
+ <td><%= job['queue'] %></td>
24
+ <td><%= job['class'] %></td>
25
+ <td><%= job['args'] %></td>
26
+ <td><%= Time.at(job['created_at']).strftime("%H:%M:%S %d.%m.%Y %z") %></td>
27
+ <td><%= job['noticed_at'] ? Time.at(job['noticed_at']).strftime("%H:%M:%S %d.%m.%Y %z") : t("noticed_unknown") %></td>
28
+ <th><%= job['status'] ? t(job['status']) : t('detected') %></th>
29
+ <td>
30
+ <form action="<%= "#{root_path}disappeared-jobs/#{job['jid']}/delete" %>" method="post">
35
31
  <%= csrf_tag %>
36
- <input class="btn btn-xs" type="submit" name="requeue" value="<%= t('requeue') %>" style="width:100%" data-confirm="<%= t('requeue_confirmation') %>" />
32
+ <input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('delete') %>" style="width:100%" data-confirm="<%= t('delete_confirmation') %>" />
37
33
  </form>
38
- <% end %>
39
- </td>
40
- </tr>
41
- <% end %>
42
- </tbody>
43
- </table>
44
- </div>
34
+ <% if job['status'] != AttentiveSidekiq::Disappeared::STATUS_REQUEUED %>
35
+ <form action="<%= "#{root_path}disappeared-jobs/#{job['jid']}/requeue" %>" method="post">
36
+ <%= csrf_tag %>
37
+ <input class="btn btn-xs" type="submit" name="requeue" value="<%= t('requeue') %>" style="width:100%" data-confirm="<%= t('requeue_confirmation') %>" />
38
+ </form>
39
+ <% end %>
40
+ </td>
41
+ </tr>
42
+ <% end %>
43
+ </tbody>
44
+ </table>
45
+ </div>
46
+
47
+ <form action="<%= "#{root_path}disappeared-jobs/delete-all" %>" method="post">
48
+ <%= csrf_tag %>
49
+ <input class="btn btn-danger btn-xs pull-right" type="submit" name="delete" value="<%= t('delete_all') %>" data-confirm="<%= t('delete_all_confirmation') %>">
50
+ </form>
51
+
52
+ <form action="<%= "#{root_path}disappeared-jobs/requeue-all" %>" method="post">
53
+ <%= csrf_tag %>
54
+ <input class="btn btn-danger btn-xs pull-right" type="submit" name="retry" value="<%= t('requeue_all') %>" data-confirm="<%= t('requeue_confirmation') %>">
55
+ </form>
56
+ <% else %>
57
+ <div class="alert alert-success"><%= t('no_disappeared_jobs') %></div>
58
+ <% end %>
data/tags ADDED
@@ -0,0 +1,111 @@
1
+ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
2
+ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
3
+ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
4
+ !_TAG_PROGRAM_NAME Exuberant Ctags //
5
+ !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
6
+ !_TAG_PROGRAM_VERSION 5.8 //
7
+ About README.md /^### About $/;" k line:12
8
+ Active lib/attentive_sidekiq/api.rb /^ class Active$/;" c line:58
9
+ ApiTest test/api_test.rb /^class ApiTest < Minitest::Test$/;" c line:3
10
+ Attentionist lib/attentive_sidekiq/middleware/client/attentionist.rb /^ class Attentionist$/;" c line:4 class:AttentiveSidekiq.Middleware.Client
11
+ Attentionist lib/attentive_sidekiq/middleware/server/attentionist.rb /^ class Attentionist$/;" c line:4 class:AttentiveSidekiq.Middleware.Server
12
+ AttentiveSidekiq lib/attentive_sidekiq.rb /^module AttentiveSidekiq$/;" m line:13
13
+ AttentiveSidekiq lib/attentive_sidekiq/api.rb /^module AttentiveSidekiq$/;" m line:1
14
+ AttentiveSidekiq lib/attentive_sidekiq/manager.rb /^module AttentiveSidekiq$/;" m line:1
15
+ AttentiveSidekiq lib/attentive_sidekiq/middleware/client/attentionist.rb /^module AttentiveSidekiq$/;" m line:1
16
+ AttentiveSidekiq lib/attentive_sidekiq/middleware/server/attentionist.rb /^module AttentiveSidekiq$/;" m line:1
17
+ AttentiveSidekiq lib/attentive_sidekiq/updater_observer.rb /^module AttentiveSidekiq$/;" m line:1
18
+ AttentiveSidekiq lib/attentive_sidekiq/version.rb /^module AttentiveSidekiq$/;" m line:1
19
+ AttentiveSidekiq lib/attentive_sidekiq/web.rb /^module AttentiveSidekiq$/;" m line:1
20
+ BaseWorker test/api_test.rb /^ class BaseWorker$/;" c line:22 class:ApiTest
21
+ Client lib/attentive_sidekiq/middleware/client/attentionist.rb /^ module Client$/;" m line:3 class:AttentiveSidekiq.Middleware
22
+ Configuration README.md /^### Configuration$/;" k line:73
23
+ DEFAULTS lib/attentive_sidekiq.rb /^ DEFAULTS = {$/;" c line:14
24
+ DefaultQueue test/server_middleware_test.rb /^ class DefaultQueue$/;" c line:59 class:ServerMiddlewareTest
25
+ Disappeared lib/attentive_sidekiq/api.rb /^ class Disappeared < RedisBasedHash$/;" c line:26
26
+ HardWorker test/server_middleware_test.rb /^ class HardWorker$/;" c line:13 class:ServerMiddlewareTest
27
+ Installation README.md /^### Installation$/;" k line:51
28
+ Manager lib/attentive_sidekiq/manager.rb /^ class Manager$/;" c line:2 class:AttentiveSidekiq
29
+ ManagerTest test/manager_test.rb /^class ManagerTest < Minitest::Test$/;" c line:3
30
+ Middleware lib/attentive_sidekiq/middleware/client/attentionist.rb /^ module Middleware$/;" m line:2 class:AttentiveSidekiq
31
+ Middleware lib/attentive_sidekiq/middleware/server/attentionist.rb /^ module Middleware$/;" m line:2 class:AttentiveSidekiq
32
+ Pre-requirements and notes README.md /^### Pre-requirements and notes$/;" k line:45
33
+ README.md README.md 1;" F line:1
34
+ REDIS test/test_helper.rb /^REDIS = Sidekiq::RedisConnection.create(:url => REDIS_URL, :namespace => REDIS_NAMESPACE)$/;" c line:19
35
+ REDIS_DISAPPEARED_KEY lib/attentive_sidekiq.rb /^ REDIS_DISAPPEARED_KEY = "attentive_disappeared_hash"$/;" c line:20
36
+ REDIS_NAMESPACE test/test_helper.rb /^REDIS_NAMESPACE = ENV["REDIS_NAMESPACE"] || 'testy'$/;" c line:18
37
+ REDIS_SUSPICIOUS_KEY lib/attentive_sidekiq.rb /^ REDIS_SUSPICIOUS_KEY = "attentive_observed_hash"$/;" c line:19
38
+ REDIS_URL test/test_helper.rb /^REDIS_URL = ENV["REDIS_URL"] || "redis:\/\/localhost:6379\/15"$/;" c line:17
39
+ RedisBasedHash lib/attentive_sidekiq/api.rb /^ class RedisBasedHash$/;" c line:2 class:AttentiveSidekiq
40
+ STATUS_DETECTED lib/attentive_sidekiq/api.rb /^ STATUS_DETECTED = 'detected'$/;" c line:27
41
+ STATUS_REQUEUED lib/attentive_sidekiq/api.rb /^ STATUS_REQUEUED = 'requeued'$/;" c line:28
42
+ Server lib/attentive_sidekiq/middleware/server/attentionist.rb /^ module Server$/;" m line:3 class:AttentiveSidekiq.Middleware
43
+ ServerMiddlewareTest test/server_middleware_test.rb /^class ServerMiddlewareTest < Minitest::Test$/;" c line:3
44
+ Sidekiq Web integration README.md /^### Sidekiq Web integration$/;" k line:38
45
+ SidekiqEmulator test/server_middleware_test.rb /^ class SidekiqEmulator$/;" c line:28 class:ServerMiddlewareTest
46
+ SimpleWorker test/api_test.rb /^ class SimpleWorker < BaseWorker$/;" c line:26 class:ApiTest
47
+ Suggestions? Bugs? README.md /^### Suggestions? Bugs?$/;" k line:91
48
+ Suspicious lib/attentive_sidekiq/api.rb /^ class Suspicious < RedisBasedHash$/;" c line:50
49
+ UpdaterObserver lib/attentive_sidekiq/updater_observer.rb /^ class UpdaterObserver$/;" c line:2 class:AttentiveSidekiq
50
+ Usage README.md /^### Usage$/;" k line:15
51
+ VERSION lib/attentive_sidekiq/version.rb /^ VERSION = "0.3.0"$/;" c line:2
52
+ VIEW_PATH lib/attentive_sidekiq/web.rb /^ VIEW_PATH = File.expand_path("..\/web\/views", __FILE__)$/;" c line:3
53
+ Web lib/attentive_sidekiq/web.rb /^ module Web$/;" m line:2 class:AttentiveSidekiq
54
+ WebTest test/web_test.rb /^class WebTest < Minitest::Test$/;" c line:4
55
+ WorkerWithArgs test/api_test.rb /^ class WorkerWithArgs < BaseWorker$/;" c line:31 class:ApiTest
56
+ add lib/attentive_sidekiq/api.rb /^ def add item$/;" f line:16 class:AttentiveSidekiq.RedisBasedHash
57
+ add lib/attentive_sidekiq/api.rb /^ def add item$/;" f line:33 class:Disappeared
58
+ api.rb lib/attentive_sidekiq/api.rb 1;" F line:1
59
+ api_test.rb test/api_test.rb 1;" F line:1
60
+ app test/web_test.rb /^ def app$/;" f line:49 class:WebTest
61
+ attentionist.rb lib/attentive_sidekiq/middleware/client/attentionist.rb 1;" F line:1
62
+ attentionist.rb lib/attentive_sidekiq/middleware/server/attentionist.rb 1;" F line:1
63
+ attentive_sidekiq.rb lib/attentive_sidekiq.rb 1;" F line:1
64
+ call lib/attentive_sidekiq/middleware/client/attentionist.rb /^ def call(worker_class, item, queue, redis_pool = nil)$/;" f line:5 class:AttentiveSidekiq.Middleware.Client.Attentionist
65
+ call lib/attentive_sidekiq/middleware/server/attentionist.rb /^ def call(worker_instance, item, queue)$/;" f line:5 class:AttentiveSidekiq.Middleware.Server.Attentionist
66
+ disappeared_now test/manager_test.rb /^ def disappeared_now$/;" f line:41
67
+ execution_interval lib/attentive_sidekiq.rb /^ def execution_interval$/;" f line:30 class:AttentiveSidekiq
68
+ get_job lib/attentive_sidekiq/api.rb /^ def get_job jid$/;" f line:12 class:AttentiveSidekiq.RedisBasedHash
69
+ hash_name lib/attentive_sidekiq/api.rb /^ def hash_name$/;" f line:44 class:Disappeared
70
+ hash_name lib/attentive_sidekiq/api.rb /^ def hash_name$/;" f line:52 class:Suspicious
71
+ instance lib/attentive_sidekiq/manager.rb /^ def self.instance$/;" F line:5 class:AttentiveSidekiq.Manager
72
+ instance test/server_middleware_test.rb /^ def self.instance$/;" F line:31 class:ServerMiddlewareTest.SidekiqEmulator
73
+ instance test/server_middleware_test.rb /^ def self.instance$/;" F line:62 class:ServerMiddlewareTest.DefaultQueue
74
+ job_ids lib/attentive_sidekiq/api.rb /^ def job_ids$/;" f line:64 class:Active
75
+ job_ids lib/attentive_sidekiq/api.rb /^ def job_ids$/;" f line:8 class:AttentiveSidekiq.RedisBasedHash
76
+ job_status test/api_test.rb /^ def job_status(item)$/;" f line:68
77
+ jobs lib/attentive_sidekiq/api.rb /^ def jobs$/;" f line:4 class:AttentiveSidekiq.RedisBasedHash
78
+ jobs lib/attentive_sidekiq/api.rb /^ def jobs$/;" f line:60 class:Active
79
+ logger lib/attentive_sidekiq.rb /^ def logger$/;" f line:35 class:AttentiveSidekiq
80
+ manager test/server_middleware_test.rb /^ def manager$/;" f line:47 class:ServerMiddlewareTest.SidekiqEmulator
81
+ manager.rb lib/attentive_sidekiq/manager.rb 1;" F line:1
82
+ manager_test.rb test/manager_test.rb 1;" F line:1
83
+ options lib/attentive_sidekiq.rb /^ def options$/;" f line:39 class:AttentiveSidekiq
84
+ options lib/attentive_sidekiq/manager.rb /^ def options$/;" f line:31 class:AttentiveSidekiq.Manager
85
+ perform test/api_test.rb /^ def perform a, b, c$/;" f line:32 class:ApiTest.WorkerWithArgs
86
+ perform test/api_test.rb /^ def perform$/;" f line:27 class:ApiTest.SimpleWorker
87
+ perform test/server_middleware_test.rb /^ def perform(seed, work_amount = 10)$/;" f line:16 class:ServerMiddlewareTest.HardWorker
88
+ process_jobs test/server_middleware_test.rb /^ def process_jobs$/;" f line:35 class:ServerMiddlewareTest.SidekiqEmulator
89
+ processor test/server_middleware_test.rb /^ def processor$/;" f line:43 class:ServerMiddlewareTest.SidekiqEmulator
90
+ queue test/server_middleware_test.rb /^ def queue$/;" f line:70 class:ServerMiddlewareTest.DefaultQueue
91
+ registered lib/attentive_sidekiq/web.rb /^ def self.registered(app)$/;" F line:5 class:AttentiveSidekiq.Web
92
+ remove lib/attentive_sidekiq/api.rb /^ def remove jid$/;" f line:20 class:AttentiveSidekiq.RedisBasedHash
93
+ requeue lib/attentive_sidekiq/api.rb /^ def requeue jid$/;" f line:38 class:Disappeared
94
+ server_middleware_test.rb test/server_middleware_test.rb 1;" F line:1
95
+ setup test/web_test.rb /^ def setup$/;" f line:7 class:WebTest
96
+ size test/server_middleware_test.rb /^ def size$/;" f line:66 class:ServerMiddlewareTest.DefaultQueue
97
+ start! lib/attentive_sidekiq/manager.rb /^ def start!$/;" f line:9 class:AttentiveSidekiq.Manager
98
+ suspicious_now test/manager_test.rb /^ def suspicious_now$/;" f line:37
99
+ test_delete_route_functions_fine test/web_test.rb /^ def test_delete_route_functions_fine$/;" f line:31 class:WebTest
100
+ test_displays_jobs_in_disappeared_hash test/web_test.rb /^ def test_displays_jobs_in_disappeared_hash$/;" f line:19 class:WebTest
101
+ test_does_not_display_jobs_not_in_disappeared_hash test/web_test.rb /^ def test_does_not_display_jobs_not_in_disappeared_hash$/;" f line:25 class:WebTest
102
+ test_helper.rb test/test_helper.rb 1;" F line:1
103
+ test_requeue_route_functions_fine test/web_test.rb /^ def test_requeue_route_functions_fine$/;" f line:39 class:WebTest
104
+ timeout_interval lib/attentive_sidekiq.rb /^ def timeout_interval$/;" f line:25 class:AttentiveSidekiq
105
+ update lib/attentive_sidekiq/updater_observer.rb /^ def update time, result, ex$/;" f line:3 class:AttentiveSidekiq.UpdaterObserver
106
+ update_disappeared_jobs lib/attentive_sidekiq/manager.rb /^ def update_disappeared_jobs$/;" f line:17 class:AttentiveSidekiq.Manager
107
+ updater_observer.rb lib/attentive_sidekiq/updater_observer.rb 1;" F line:1
108
+ version.rb lib/attentive_sidekiq/version.rb 1;" F line:1
109
+ web.rb lib/attentive_sidekiq/web.rb 1;" F line:1
110
+ web_test.rb test/web_test.rb 1;" F line:1
111
+ work_unit test/server_middleware_test.rb /^ def work_unit$/;" f line:52 class:ServerMiddlewareTest.SidekiqEmulator
data/test/test_helper.rb CHANGED
@@ -14,7 +14,7 @@ require 'minitest/autorun'
14
14
  require 'minitest/pride'
15
15
  require 'minitest/stub_any_instance'
16
16
 
17
- REDIS_URL = ENV["REDIS_URL"] || "redis://localhost:15"
17
+ REDIS_URL = ENV["REDIS_URL"] || "redis://localhost:6379/15"
18
18
  REDIS_NAMESPACE = ENV["REDIS_NAMESPACE"] || 'testy'
19
19
  REDIS = Sidekiq::RedisConnection.create(:url => REDIS_URL, :namespace => REDIS_NAMESPACE)
20
20
 
data/test/web_test.rb CHANGED
@@ -28,6 +28,22 @@ class WebTest < Minitest::Test
28
28
  refute_match @item_in_progress['jid'], last_response.body
29
29
  end
30
30
 
31
+ def test_delete_all_route_functions_fine
32
+ AttentiveSidekiq::Disappeared.stub(:remove, nil) do
33
+ post "/disappeared-jobs/delete-all"
34
+ follow_redirect!
35
+ assert_equal 200, last_response.status
36
+ end
37
+ end
38
+
39
+ def test_requeue_all_route_functions_fine
40
+ AttentiveSidekiq::Disappeared.stub(:requeue, nil) do
41
+ post "/disappeared-jobs/requeue-all"
42
+ follow_redirect!
43
+ assert_equal 200, last_response.status
44
+ end
45
+ end
46
+
31
47
  def test_delete_route_functions_fine
32
48
  AttentiveSidekiq::Disappeared.stub(:remove, nil) do
33
49
  post "/disappeared-jobs/#{@item_disappeared['jid']}/delete"
metadata CHANGED
@@ -1,153 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attentive_sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - twonegatives
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-26 00:00:00.000000000 Z
11
+ date: 2017-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '11.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '11.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '5.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest-stub_any_instance
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: redis-namespace
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.5'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.5'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rack-test
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0.6'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.6'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.10'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.10'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pry-byebug
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - ! '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: activesupport
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - ! '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - ! '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: concurrent-ruby
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
145
  version: '1.0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
152
  version: '1.0'
153
153
  description: This gem allows you to watch the jobs which suddenly dissappeared from
@@ -164,7 +164,6 @@ files:
164
164
  - Rakefile
165
165
  - attentive_sidekiq.gemspec
166
166
  - circle.yml
167
- - dump.rdb
168
167
  - lib/attentive_sidekiq.rb
169
168
  - lib/attentive_sidekiq/api.rb
170
169
  - lib/attentive_sidekiq/manager.rb
@@ -173,9 +172,11 @@ files:
173
172
  - lib/attentive_sidekiq/updater_observer.rb
174
173
  - lib/attentive_sidekiq/version.rb
175
174
  - lib/attentive_sidekiq/web.rb
175
+ - lib/attentive_sidekiq/web/locales/cs.yml
176
176
  - lib/attentive_sidekiq/web/locales/en.yml
177
177
  - lib/attentive_sidekiq/web/locales/ru.yml
178
178
  - lib/attentive_sidekiq/web/views/disappeared-list.erb
179
+ - tags
179
180
  - test/api_test.rb
180
181
  - test/manager_test.rb
181
182
  - test/server_middleware_test.rb
@@ -191,17 +192,17 @@ require_paths:
191
192
  - lib
192
193
  required_ruby_version: !ruby/object:Gem::Requirement
193
194
  requirements:
194
- - - ">="
195
+ - - ! '>='
195
196
  - !ruby/object:Gem::Version
196
197
  version: '0'
197
198
  required_rubygems_version: !ruby/object:Gem::Requirement
198
199
  requirements:
199
- - - ">="
200
+ - - ! '>='
200
201
  - !ruby/object:Gem::Version
201
202
  version: '0'
202
203
  requirements: []
203
204
  rubyforge_project:
204
- rubygems_version: 2.4.5
205
+ rubygems_version: 2.6.11
205
206
  signing_key:
206
207
  specification_version: 4
207
208
  summary: Make your sidekiq to be attentive to lost jobs
data/dump.rdb DELETED
Binary file