magic_recipes_two 0.0.49 → 0.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjAxZGM5ZmFiZTVkMDhmZDUyOTIzYTcxMDBmZWZjNTU3NDVhYzYwNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODFhZTE0NTAzMTA3MDcyM2ZkYjRmNzk3YmVjN2NjZDRjMTgzNmMxYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjZlY2U4MzgxYzAzMmU0MzY0MTEwODk3NmFlOGJiNjVlNWI5YWY4MDRhZjVh
|
10
|
+
ZTcxYjk3ZDY2MmRmM2JmNWJhMTQxNWUwN2M3Njk3ZGM1NDI0MDc5MmU2ZDkx
|
11
|
+
MmJkZTY3NDA1OWE1MzA1NDUyYjRlOWVjYjA5NWFjZjdkODIzYzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2NiOTA4ZjYyMjc1ZWNhNzQ0Y2U5ODRhNjkxODFiMjBjZjA3YzNmMjlkOTll
|
14
|
+
YTkwMTI4NTYwYjQ3OWQ2NDI2ZjcxZGY1YmJlM2FhNDVkZmUxNTRjMzQ0YjBl
|
15
|
+
NWM1NDUwYTRiMmU3YzA3ODhkYTEzMGVkZGQ2NzE4ZTJiYWQ4ZGE=
|
@@ -84,7 +84,8 @@ namespace :monit do
|
|
84
84
|
if Array(fetch(:monit_processes)).include?(process)
|
85
85
|
on roles(fetch("#{process}_roles".to_sym)) do
|
86
86
|
if process == "sidekiq"
|
87
|
-
fetch(:sidekiq_processes)
|
87
|
+
# fetch(:sidekiq_processes)
|
88
|
+
sidekiq_processes_count.times do |idx|
|
88
89
|
sudo "#{fetch(:monit_bin)} #{command} #{sidekiq_service_name(idx)}"
|
89
90
|
end
|
90
91
|
elsif process == "thin"
|
@@ -77,7 +77,7 @@ namespace :sidekiq do
|
|
77
77
|
|
78
78
|
end
|
79
79
|
else
|
80
|
-
fetch(:sidekiq_processes).times do |idx|
|
80
|
+
fetch(:sidekiq_processes).to_i.times do |idx|
|
81
81
|
pids.push (idx.zero? && fetch(:sidekiq_processes) <= 1) ?
|
82
82
|
fetch(:sidekiq_pid) :
|
83
83
|
fetch(:sidekiq_pid).gsub(/\.pid$/, "-#{idx}.pid")
|
@@ -86,6 +86,14 @@ namespace :sidekiq do
|
|
86
86
|
end
|
87
87
|
pids
|
88
88
|
end
|
89
|
+
|
90
|
+
def sidekiq_processes_count
|
91
|
+
if fetch(:sidekiq_special_queues)
|
92
|
+
fetch(:sidekiq_queued_processes).inject(0){ |sum,qp| sum + (qp[:processes] && qp[:processes].to_i > 0 ? qp[:processes].to_i : 1) }
|
93
|
+
else
|
94
|
+
fetch(:sidekiq_processes).to_i
|
95
|
+
end
|
96
|
+
end
|
89
97
|
|
90
98
|
def pid_process_exists?(pid_file)
|
91
99
|
pid_file_exists?(pid_file) and test(*("kill -0 $( cat #{pid_file} )").split(' '))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magic_recipes_two
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Torsten Wetzel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|