sidekiq 3.4.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq might be problematic. Click here for more details.

Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -2
  3. data/4.0-Upgrade.md +50 -0
  4. data/COMM-LICENSE +55 -45
  5. data/Changes.md +85 -1
  6. data/Ent-Changes.md +79 -0
  7. data/Gemfile +7 -1
  8. data/Pro-2.0-Upgrade.md +2 -2
  9. data/Pro-3.0-Upgrade.md +46 -0
  10. data/Pro-Changes.md +60 -2
  11. data/README.md +20 -16
  12. data/bin/sidekiq +4 -0
  13. data/bin/sidekiqctl +8 -2
  14. data/bin/sidekiqload +167 -0
  15. data/lib/generators/sidekiq/templates/worker_spec.rb.erb +2 -2
  16. data/lib/generators/sidekiq/templates/worker_test.rb.erb +5 -5
  17. data/lib/sidekiq/api.rb +43 -33
  18. data/lib/sidekiq/cli.rb +41 -42
  19. data/lib/sidekiq/client.rb +5 -10
  20. data/lib/sidekiq/fetch.rb +35 -111
  21. data/lib/sidekiq/launcher.rb +102 -42
  22. data/lib/sidekiq/manager.rb +80 -180
  23. data/lib/sidekiq/middleware/server/logging.rb +13 -8
  24. data/lib/sidekiq/middleware/server/retry_jobs.rb +6 -6
  25. data/lib/sidekiq/processor.rb +126 -97
  26. data/lib/sidekiq/redis_connection.rb +23 -5
  27. data/lib/sidekiq/scheduled.rb +47 -26
  28. data/lib/sidekiq/testing.rb +139 -17
  29. data/lib/sidekiq/util.rb +20 -0
  30. data/lib/sidekiq/version.rb +1 -1
  31. data/lib/sidekiq/web.rb +17 -1
  32. data/lib/sidekiq/web_helpers.rb +33 -5
  33. data/lib/sidekiq/worker.rb +16 -0
  34. data/lib/sidekiq.rb +37 -14
  35. data/sidekiq.gemspec +10 -11
  36. data/test/helper.rb +45 -10
  37. data/test/test_actors.rb +137 -0
  38. data/test/test_api.rb +417 -384
  39. data/test/test_cli.rb +29 -59
  40. data/test/test_client.rb +60 -135
  41. data/test/test_extensions.rb +29 -23
  42. data/test/test_fetch.rb +2 -57
  43. data/test/test_launcher.rb +80 -0
  44. data/test/test_logging.rb +1 -1
  45. data/test/test_manager.rb +16 -131
  46. data/test/test_middleware.rb +3 -5
  47. data/test/test_processor.rb +110 -76
  48. data/test/test_rails.rb +21 -0
  49. data/test/test_redis_connection.rb +0 -1
  50. data/test/test_retry.rb +114 -162
  51. data/test/test_scheduled.rb +11 -17
  52. data/test/test_scheduling.rb +20 -42
  53. data/test/test_sidekiq.rb +46 -16
  54. data/test/test_testing.rb +80 -20
  55. data/test/test_testing_fake.rb +83 -8
  56. data/test/test_testing_inline.rb +3 -3
  57. data/test/test_util.rb +16 -0
  58. data/test/test_web.rb +28 -9
  59. data/test/test_web_helpers.rb +3 -2
  60. data/web/assets/images/favicon.ico +0 -0
  61. data/web/assets/javascripts/application.js +6 -1
  62. data/web/assets/javascripts/dashboard.js +2 -8
  63. data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +14 -14
  64. data/web/assets/stylesheets/application.css +33 -56
  65. data/web/locales/de.yml +1 -1
  66. data/web/locales/en.yml +2 -0
  67. data/web/locales/fr.yml +2 -2
  68. data/web/locales/ja.yml +10 -1
  69. data/web/locales/{no.yml → nb.yml} +10 -2
  70. data/web/locales/uk.yml +76 -0
  71. data/web/views/_footer.erb +2 -7
  72. data/web/views/_job_info.erb +5 -1
  73. data/web/views/_nav.erb +2 -2
  74. data/web/views/_poll_js.erb +5 -0
  75. data/web/views/{_poll.erb → _poll_link.erb} +0 -3
  76. data/web/views/busy.erb +2 -1
  77. data/web/views/dead.erb +1 -0
  78. data/web/views/layout.erb +2 -0
  79. data/web/views/morgue.erb +3 -0
  80. data/web/views/queue.erb +1 -0
  81. data/web/views/queues.erb +1 -0
  82. data/web/views/retries.erb +3 -0
  83. data/web/views/retry.erb +1 -0
  84. data/web/views/scheduled.erb +1 -0
  85. data/web/views/scheduled_job_info.erb +1 -0
  86. metadata +75 -55
  87. data/lib/sidekiq/actor.rb +0 -39
  88. data/test/test_worker_generator.rb +0 -17
@@ -181,6 +181,10 @@ form .btn {
181
181
  margin-right: 5px;
182
182
  }
183
183
 
184
+ form .btn-group .btn {
185
+ margin-right: 1px;
186
+ }
187
+
184
188
  td form {
185
189
  margin-bottom: 0;
186
190
  }
@@ -471,16 +475,22 @@ div.interval-slider input {
471
475
 
472
476
  .beacon {
473
477
  position: relative;
478
+ width: 20px;
474
479
  height: 20px;
475
480
  display: inline-block;
476
481
  }
477
482
 
478
- .beacon .dot {
483
+ .beacon .dot,
484
+ .beacon .ring {
479
485
  position: absolute;
480
- top: 5px;
481
- left: 10px;
486
+ top: 50%;
487
+ left: 50%;
488
+ }
489
+
490
+ .beacon .dot {
482
491
  width: 10px;
483
492
  height: 10px;
493
+ margin: -5px 0 0 -5px;
484
494
  background-color: #80002d;
485
495
  border-radius: 10px;
486
496
  box-shadow: 0 0 9px #666;
@@ -490,140 +500,103 @@ div.interval-slider input {
490
500
  z-index: 10;
491
501
  }
492
502
 
493
- .beacon .dot.pulse {
503
+ .beacon.pulse .dot {
494
504
  -webkit-animation: beacon-dot-pulse 1s ease-out;
495
505
  -moz-animation: beacon-dot-pulse 1s ease-out;
496
506
  animation: beacon-dot-pulse 1s ease-out;
497
- -webkit-animation-iteration-count: 1;
498
- -moz-animation-iteration-count: 1;
499
- animation-iteration-count: 1;
500
507
  }
501
508
 
502
509
  @-webkit-keyframes beacon-dot-pulse {
503
510
  from {
504
511
  background-color: #80002d;
505
512
  -webkit-box-shadow: 0 0 9px #666;
506
- -moz-box-shadow: 0 0 9px #666;
507
- box-shadow: 0 0 9px #666;
508
513
  }
509
514
  50% {
510
515
  background-color: #c90047;
511
516
  -webkit-box-shadow: 0 0 18px #666;
512
- -moz-box-shadow: 0 0 18px #666;
513
- box-shadow: 0 0 18px #666;
514
517
  }
515
518
  to {
516
519
  background-color: #80002d;
517
520
  -webkit-box-shadow: 0 0 9px #666;
518
- -moz-box-shadow: 0 0 9px #666;
519
- box-shadow: 0 0 9px #666;
520
521
  }
521
522
  }
522
523
 
523
524
  @-moz-keyframes beacon-dot-pulse {
524
525
  from {
525
526
  background-color: #80002d;
526
- -webkit-box-shadow: 0 0 9px #666;
527
527
  -moz-box-shadow: 0 0 9px #666;
528
- box-shadow: 0 0 9px #666;
529
528
  }
530
529
  50% {
531
530
  background-color: #c90047;
532
- -webkit-box-shadow: 0 0 18px #666;
533
531
  -moz-box-shadow: 0 0 18px #666;
534
- box-shadow: 0 0 18px #666;
535
532
  }
536
533
  to {
537
534
  background-color: #80002d;
538
- -webkit-box-shadow: 0 0 9px #666;
539
535
  -moz-box-shadow: 0 0 9px #666;
540
- box-shadow: 0 0 9px #666;
541
536
  }
542
537
  }
543
538
 
544
539
  @keyframes beacon-dot-pulse {
545
540
  from {
546
541
  background-color: #80002d;
547
- -webkit-box-shadow: 0 0 9px #666;
548
- -moz-box-shadow: 0 0 9px #666;
549
542
  box-shadow: 0 0 9px #666;
550
543
  }
551
544
  50% {
552
545
  background-color: #c90047;
553
- -webkit-box-shadow: 0 0 18px #666;
554
- -moz-box-shadow: 0 0 18px #666;
555
546
  box-shadow: 0 0 18px #666;
556
547
  }
557
548
  to {
558
549
  background-color: #80002d;
559
- -webkit-box-shadow: 0 0 9px #666;
560
- -moz-box-shadow: 0 0 9px #666;
561
550
  box-shadow: 0 0 9px #666;
562
551
  }
563
552
  }
564
553
 
565
554
  .beacon .ring {
566
- position: absolute;
567
- top: 7px;
568
- left: 12px;
569
- width: 0;
570
- height: 0;
571
- border-radius: 3px;
555
+ width: 28px;
556
+ height: 28px;
557
+ margin: -14px 0 0 -14px;
558
+ border-radius: 28px;
572
559
  border: 3px solid #80002d;
573
560
  z-index: 5;
561
+ opacity: 0;
574
562
  }
575
563
 
576
- .beacon .ring.pulse {
564
+ .beacon.pulse .ring {
577
565
  -webkit-animation: beacon-ring-pulse 1s;
578
566
  -moz-animation: beacon-ring-pulse 1s;
579
567
  animation: beacon-ring-pulse 1s;
580
- -webkit-animation-iteration-count: 1;
581
- -moz-animation-iteration-count: 1;
582
- animation-iteration-count: 1;
583
568
  }
584
569
 
585
570
  @-webkit-keyframes beacon-ring-pulse {
586
571
  0% {
587
572
  opacity: 1;
588
- -webkit-transform: scale(0);
573
+ -webkit-transform: scale(0.3);
589
574
  }
590
575
  100% {
591
576
  opacity: 0;
592
- border-radius: 15px;
593
- padding: 8px;
594
- top: 0;
595
- left: 4px;
596
- -webkit-transform: scale(1.5);
577
+ -webkit-transform: scale(1);
597
578
  }
598
579
  }
599
580
 
600
581
  @-moz-keyframes beacon-ring-pulse {
601
582
  0% {
602
583
  opacity: 1;
603
- -moz-transform: scale(0);
584
+ -moz-transform: scale(0.3);
604
585
  }
605
586
  100% {
606
587
  opacity: 0;
607
- border-radius: 15px;
608
- padding: 8px;
609
- top: 2px;
610
- left: 7px;
611
- -moz-transform: scale(1.6);
588
+ -moz-transform: scale(1);
612
589
  }
613
590
  }
614
591
 
615
592
  @keyframes beacon-ring-pulse {
616
593
  0% {
617
594
  opacity: 1;
618
- transform: scale(0);
595
+ transform: scale(0.3);
619
596
  }
620
597
  100% {
621
598
  opacity: 0;
622
- border-radius: 15px;
623
- padding: 8px;
624
- top: 0;
625
- left: 5px;
626
- transform: scale(1.5);
599
+ transform: scale(1);
627
600
  }
628
601
  }
629
602
 
@@ -759,19 +732,23 @@ div.interval-slider input {
759
732
 
760
733
  @media (min-width: 992px) {
761
734
  .redis-url {
762
- max-width: 340px;
735
+ max-width: 390px;
763
736
  }
764
737
 
765
738
  .redis-namespace {
766
- max-width: 350px;
739
+ max-width: 300px;
767
740
  }
768
741
  }
769
742
  @media (min-width: 1200px) {
770
743
  .redis-url {
771
- max-width: 540px;
744
+ max-width: 480px;
772
745
  }
773
746
 
774
747
  .redis-namespace {
775
748
  max-width: 350px;
776
749
  }
777
750
  }
751
+
752
+ .redis-url {
753
+ text-overflow: ellipsis;
754
+ }
data/web/locales/de.yml CHANGED
@@ -47,7 +47,7 @@ de:
47
47
  GoBack: ← Zurück
48
48
  NoScheduledFound: Keine geplanten Jobs gefunden
49
49
  When: Wann
50
- ScheduledJobs: Jobs in Wartschlange
50
+ ScheduledJobs: Jobs in der Warteschlange
51
51
  idle: inaktiv
52
52
  active: aktiv
53
53
  Version: Version
data/web/locales/en.yml CHANGED
@@ -74,3 +74,5 @@ en: # <---- change this to your locale code
74
74
  QuietAll: Quiet All
75
75
  PollingInterval: Polling interval
76
76
  Plugins: Plugins
77
+ NotYetEnqueued: Not yet enqueued
78
+ CreatedAt: Created At
data/web/locales/fr.yml CHANGED
@@ -64,6 +64,6 @@ fr:
64
64
  NoDeadJobsFound: Aucune tâche morte n'a été trouvée
65
65
  Dead: Morte
66
66
  Processes: Processus
67
- Thread: Fil
68
- Threads: Fils
67
+ Thread: Thread
68
+ Threads: Threads
69
69
  Jobs: Tâches
data/web/locales/ja.yml CHANGED
@@ -38,7 +38,7 @@ ja:
38
38
  AreYouSure: いいですか?
39
39
  DeleteAll: 全て削除
40
40
  RetryAll: 全て再試行
41
- NoRetriesFound: 再試行できません
41
+ NoRetriesFound: 再試行するジョブはありません
42
42
  Error: エラー
43
43
  ErrorClass: クラスエラー
44
44
  ErrorMessage: エラーメッセージ
@@ -67,3 +67,12 @@ ja:
67
67
  Thread: スレッド
68
68
  Threads: スレッド
69
69
  Jobs: ジョブ
70
+ Paused: 一時停止中
71
+ Stop: 停止
72
+ Quiet: 処理終了
73
+ StopAll: すべて停止
74
+ QuietAll: すべて処理終了
75
+ PollingInterval: ポーリング間隔
76
+ Plugins: プラグイン
77
+ NotYetEnqueued: キューに入っていません
78
+ CreatedAt: 作成日時
@@ -1,5 +1,5 @@
1
1
  # elements like %{queue} are variables and should not be translated
2
- no:
2
+ nb:
3
3
  Dashboard: Oversikt
4
4
  Status: Status
5
5
  Time: Tid
@@ -33,6 +33,7 @@ no:
33
33
  NextRetry: Neste forsøk
34
34
  RetryCount: Antall forsøk
35
35
  RetryNow: Forsøk igjen nå
36
+ Kill: Kill
36
37
  LastRetry: Forrige forsøk
37
38
  OriginallyFailed: Feilet opprinnelig
38
39
  AreYouSure: Er du sikker?
@@ -58,7 +59,6 @@ no:
58
59
  OneMonth: 1 måned
59
60
  ThreeMonths: 3 måneder
60
61
  SixMonths: 6 måneder
61
- Batches: Samlinger
62
62
  Failures: Feil
63
63
  DeadJobs: Døde jobber
64
64
  NoDeadJobsFound: Ingen døde jobber funnet
@@ -67,3 +67,11 @@ no:
67
67
  Thread: Tråd
68
68
  Threads: Tråder
69
69
  Jobs: Jobber
70
+ Paused: Pauset
71
+ Stop: Stopp
72
+ Quiet: Demp
73
+ StopAll: Stopp alle
74
+ QuietAll: Demp alle
75
+ PollingInterval: Oppdateringsintervall
76
+ Plugins: Innstikk
77
+ NotYetEnqueued: Ikke køet enda
@@ -0,0 +1,76 @@
1
+ uk:
2
+ Dashboard: Панель керування
3
+ Status: Статус
4
+ Time: Час
5
+ Namespace: Простір імен
6
+ Realtime: Зараз
7
+ History: Історія
8
+ Busy: Зайнятих
9
+ Processed: Опрацьовано
10
+ Failed: Невдалих
11
+ Scheduled: Заплановано
12
+ Retries: Спроби
13
+ Enqueued: У черзі
14
+ Worker: Обробник
15
+ LivePoll: Постійне опитування
16
+ StopPolling: Зупинити опитування
17
+ Queue: Черга
18
+ Class: Клас
19
+ Job: Задача
20
+ Arguments: Аргументи
21
+ Extras: Додатково
22
+ Started: Запущено
23
+ ShowAll: Відобразити усі
24
+ CurrentMessagesInQueue: Поточні задачі у черзі <span class='title'>%{queue}</span>
25
+ Delete: Видалити
26
+ AddToQueue: Додати до черги
27
+ AreYouSureDeleteJob: Ви впевнені у тому, що хочете видалити задачу?
28
+ AreYouSureDeleteQueue: Ви впевнені у тому, що хочете видалити чергу %{queue}?
29
+ Queues: Черги
30
+ Size: Розмір
31
+ Actions: Дії
32
+ NextRetry: Наступна спроба
33
+ RetryCount: Кількість спроб
34
+ RetryNow: Повторити зараз
35
+ Kill: Вбиваємо
36
+ LastRetry: Остання спроба
37
+ OriginallyFailed: Перша невдала спроба
38
+ AreYouSure: Ви впевнені?
39
+ DeleteAll: Видалити усі
40
+ RetryAll: Повторити усі
41
+ NoRetriesFound: Спроб не знайдено
42
+ Error: Помилка
43
+ ErrorClass: Клас помилки
44
+ ErrorMessage: Повідомлення про помилку
45
+ ErrorBacktrace: Трасування помилки
46
+ GoBack: ← Назад
47
+ NoScheduledFound: Запланованих задач не знайдено
48
+ When: Коли
49
+ ScheduledJobs: Заплановані задачі
50
+ idle: незайнятий
51
+ active: активний
52
+ Version: Версія
53
+ Connections: З'єднань
54
+ MemoryUsage: Використання пам'яті
55
+ PeakMemoryUsage: Максимальне використання пам'яті
56
+ Uptime: Днів безперебійної роботи
57
+ OneWeek: 1 тиждень
58
+ OneMonth: 1 місяць
59
+ ThreeMonths: 3 місяці
60
+ SixMonths: 6 місяців
61
+ Failures: Невдачі
62
+ DeadJobs: Вбиті задачі
63
+ NoDeadJobsFound: Вбитих задач не знайдено
64
+ Dead: Вбитих
65
+ Processes: Процеси
66
+ Thread: Потік
67
+ Threads: Потоки
68
+ Jobs: Задачі
69
+ Paused: Призупинено
70
+ Stop: Зупинити
71
+ Quiet: Призупинити
72
+ StopAll: Зупинити усі
73
+ QuietAll: Призупинити усі
74
+ PollingInterval: Інтервал опитування
75
+ Plugins: Плагіни
76
+ NotYetEnqueued: Ще не в черзі
@@ -6,16 +6,11 @@
6
6
  <p class="navbar-text" style="color:white;"><%= product_version %></p>
7
7
  </li>
8
8
  <li>
9
- <p class="navbar-text redis-url">Redis: <%= redis_connection %></p>
9
+ <p class="navbar-text redis-url" title="<%= redis_connection_and_namespace %>"><%= redis_connection_and_namespace %></p>
10
10
  </li>
11
11
  <li>
12
- <p class="navbar-text"><%= t('Time') %>: <%= Time.now.utc.strftime('%H:%M:%S UTC') %></p>
12
+ <p class="navbar-text"><%= Time.now.utc.strftime('%H:%M:%S UTC') %></p>
13
13
  </li>
14
- <% if namespace %>
15
- <li>
16
- <p class="navbar-text redis-namespace"><%= t('Namespace') %>: <%= namespace %></p>
17
- </li>
18
- <% end %>
19
14
  </ul>
20
15
  </div>
21
16
  </div>
@@ -32,9 +32,13 @@
32
32
  <code><%= job.jid %></code>
33
33
  </td>
34
34
  </tr>
35
+ <tr>
36
+ <th><%= t('CreatedAt') %></th>
37
+ <td><%= relative_time(job.created_at) %></td>
38
+ </tr>
35
39
  <tr>
36
40
  <th><%= t('Enqueued') %></th>
37
- <td><%= relative_time(job.enqueued_at) %></td>
41
+ <td><%= (enqueued_at = job.enqueued_at) ? relative_time(enqueued_at) : t('NotYetEnqueued') %></td>
38
42
  </tr>
39
43
  <% unless retry_extra_items(job).empty? %>
40
44
  <tr>
data/web/views/_nav.erb CHANGED
@@ -7,7 +7,7 @@
7
7
  <span class="icon-bar"></span>
8
8
  </button>
9
9
  <div class="navbar-toggle collapsed navbar-livereload">
10
- <%= erb :_poll %>
10
+ <%= erb :_poll_link %>
11
11
  <% if Sidekiq::Web.app_url %>
12
12
  <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>">Back to App</a>
13
13
  <% end %>
@@ -54,7 +54,7 @@
54
54
  <ul class="nav navbar-nav navbar-right navbar-livereload" data-navbar="static">
55
55
  <li>
56
56
  <div class="poll-wrapper pull-right">
57
- <%= erb :_poll %>
57
+ <%= erb :_poll_link %>
58
58
  <% if Sidekiq::Web.app_url %>
59
59
  <a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>">Back to App</a>
60
60
  <% end %>
@@ -0,0 +1,5 @@
1
+ <% if current_path != '' && params[:poll] %>
2
+ <script>
3
+ updatePage('<%= root_path + current_path %>')
4
+ </script>
5
+ <% end %>
@@ -1,8 +1,5 @@
1
1
  <% if current_path != '' %>
2
2
  <% if params[:poll] %>
3
- <script>
4
- updatePage('<%= root_path + current_path %>')
5
- </script>
6
3
  <a id="live-poll" class="btn btn-primary active" href="<%= root_path + current_path %>"><%= t('StopPolling') %></a>
7
4
  <% else %>
8
5
  <a id="live-poll" class="btn btn-primary" href="<%= root_path + current_path %>?<%= qparams(poll: true) %>"><%= t('LivePoll') %></a>
data/web/views/busy.erb CHANGED
@@ -4,6 +4,7 @@
4
4
  </div>
5
5
  <div class="col-sm-4 pull-right">
6
6
  <form method="POST" style="margin-top: 20px; margin-bottom: 10px;">
7
+ <%= csrf_tag %>
7
8
  <div class="btn-group pull-right">
8
9
  <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('QuietAll') %></button>
9
10
  <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('StopAll') %></button>
@@ -11,7 +12,6 @@
11
12
  </form>
12
13
  </div>
13
14
  </div>
14
- </div>
15
15
 
16
16
  <div class="table_container">
17
17
  <table class="processes table table-hover table-bordered table-striped table-white">
@@ -40,6 +40,7 @@
40
40
  <td>
41
41
  <div class="btn-group pull-right">
42
42
  <form method="POST">
43
+ <%= csrf_tag %>
43
44
  <input type="hidden" name="identity" value="<%= process['identity'] %>"/>
44
45
  <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
45
46
  <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
data/web/views/dead.erb CHANGED
@@ -27,6 +27,7 @@
27
27
  </div>
28
28
 
29
29
  <form class="form-horizontal" action="<%= root_path %>morgue/<%= job_params(@dead, @dead.score) %>" method="post">
30
+ <%= csrf_tag %>
30
31
  <a class="btn btn-default" href="<%= root_path %>morgue"><%= t('GoBack') %></a>
31
32
  <input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
32
33
  <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
data/web/views/layout.erb CHANGED
@@ -5,6 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
6
6
  <link href="<%= root_path %>stylesheets/bootstrap.css" media="screen" rel="stylesheet" type="text/css" />
7
7
  <link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />
8
+ <link rel="shortcut icon" type="image/ico" href="<%= root_path %>images/favicon.ico" />
8
9
  <script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
9
10
  <script type="text/javascript" src="<%= root_path %>javascripts/locales/jquery.timeago.<%= locale %>.js"></script>
10
11
  <meta name="google" content="notranslate" />
@@ -26,5 +27,6 @@
26
27
  </div>
27
28
  </div>
28
29
  <%= erb :_footer %>
30
+ <%= erb :_poll_js %>
29
31
  </body>
30
32
  </html>
data/web/views/morgue.erb CHANGED
@@ -12,6 +12,7 @@
12
12
 
13
13
  <% if @dead.size > 0 %>
14
14
  <form action="<%= root_path %>morgue" method="post">
15
+ <%= csrf_tag %>
15
16
  <div class="table_container">
16
17
  <table class="table table-striped table-bordered table-white">
17
18
  <thead>
@@ -57,9 +58,11 @@
57
58
  </form>
58
59
 
59
60
  <form action="<%= root_path %>morgue/all/delete" method="post">
61
+ <%= csrf_tag %>
60
62
  <input class="btn btn-danger btn-xs pull-right" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
61
63
  </form>
62
64
  <form action="<%= root_path %>morgue/all/retry" method="post">
65
+ <%= csrf_tag %>
63
66
  <input class="btn btn-danger btn-xs pull-right" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
64
67
  </form>
65
68
 
data/web/views/queue.erb CHANGED
@@ -33,6 +33,7 @@
33
33
  </td>
34
34
  <td>
35
35
  <form action="<%= root_path %>queues/<%= @name %>/delete" method="post">
36
+ <%= csrf_tag %>
36
37
  <input name="key_val" value="<%= h Sidekiq.dump_json(msg.item) %>" type="hidden" />
37
38
  <input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
38
39
  </form>
data/web/views/queues.erb CHANGED
@@ -18,6 +18,7 @@
18
18
  <td><%= number_with_delimiter(queue.size) %> </td>
19
19
  <td width="20%">
20
20
  <form action="<%=root_path %>queues/<%= queue.name %>" method="post">
21
+ <%= csrf_tag %>
21
22
  <input class="btn btn-danger btn-xs" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
22
23
  </form>
23
24
  </td>
@@ -12,6 +12,7 @@
12
12
 
13
13
  <% if @retries.size > 0 %>
14
14
  <form action="<%= root_path %>retries" method="post">
15
+ <%= csrf_tag %>
15
16
  <div class="table_container">
16
17
  <table class="table table-striped table-bordered table-white">
17
18
  <thead>
@@ -60,9 +61,11 @@
60
61
  </form>
61
62
 
62
63
  <form action="<%= root_path %>retries/all/delete" method="post">
64
+ <%= csrf_tag %>
63
65
  <input class="btn btn-danger btn-xs pull-right" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
64
66
  </form>
65
67
  <form action="<%= root_path %>retries/all/retry" method="post">
68
+ <%= csrf_tag %>
66
69
  <input class="btn btn-danger btn-xs pull-right" type="submit" name="retry" value="<%= t('RetryAll') %>" data-confirm="<%= t('AreYouSure') %>" />
67
70
  </form>
68
71
 
data/web/views/retry.erb CHANGED
@@ -27,6 +27,7 @@
27
27
  </div>
28
28
 
29
29
  <form class="form-horizontal" action="<%= root_path %>retries/<%= job_params(@retry, @retry.score) %>" method="post">
30
+ <%= csrf_tag %>
30
31
  <a class="btn btn-default" href="<%= root_path %>retries"><%= t('GoBack') %></a>
31
32
  <input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
32
33
  <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
@@ -13,6 +13,7 @@
13
13
  <% if @scheduled.size > 0 %>
14
14
 
15
15
  <form action="<%= root_path %>scheduled" method="post">
16
+ <%= csrf_tag %>
16
17
  <div class="table_container">
17
18
  <table class="table table-striped table-bordered table-white">
18
19
  <thead>
@@ -1,6 +1,7 @@
1
1
  <%= erb :_job_info, :locals => {:job => @job, :type => :scheduled} %>
2
2
 
3
3
  <form class="form-horizontal" action="<%= root_path %>scheduled/<%= job_params(@job, @job.score) %>" method="post">
4
+ <%= csrf_tag %>
4
5
  <a class="btn btn-default" href="<%= root_path %>scheduled"><%= t('GoBack') %></a>
5
6
  <input class="btn btn-primary" type="submit" name="add_to_queue" value="<%= t('AddToQueue') %>" />
6
7
  <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />