magic_recipes_two 0.0.36 → 0.0.37

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
- YWRiZWI3YTQ4Mjk0Yzc2NmMzMDFiODFmN2Q2MWMxYTQxZTU5MGQ4Ng==
4
+ ZjhiNTBmODMxYWY4YTA1ODI2OTkzY2NlZDQ1N2FiMjVjNzAwN2Q2Ng==
5
5
  data.tar.gz: !binary |-
6
- MDcwMGEwYjE5OWYxZDVjZGQ3YmYzNWZhN2ViYTE5YjRjYThhMDE0OA==
6
+ YTk5YjhjOTM0YmFkMjNjZWI2ZTc4NzhkZGM1YzEzNzMwYjBjOTY5MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2YwN2MxY2FiM2Q1NDhmZjlhZTRmYjc0MjE2MWExZWNkMTg3NjFjNjkzMWFm
10
- NzZkMzcxNWJmMmZkYjMxZDhiMzQyYjRmZGExZTA5YWU0MWEwMDE2NGIzZTQ1
11
- M2U2Y2I3NWY4N2RiODZkNWFkNDg0MGQxNzMzM2Y5MjE1ZjRiMGE=
9
+ OTdiNzdjNGIzNjBhZDNlYjAzMDlhZDUzNTQ2Y2NkMmE3NDk3MjdiMDlhNDZi
10
+ NDZkMzA1MTk0MTJiOGU5YTE2Y2JhYjhjZDkxZWEyNmZiMjIwMjE1ZGI3ZGE5
11
+ Y2Q0ZWE3MWI3YmJjYTY5YjlmNWQzOGExMTZlMjlhZjI1N2EwOGU=
12
12
  data.tar.gz: !binary |-
13
- YzRiNzc0OWIyNDAzMzM3N2UyYzZhNDZhOWY3NGRhODViYzE0ZDIxMDU3ZmZl
14
- NzRlZjI4MjEzZDQ4NmU2OTAzNTI3NDViYzkyZDJmMWFjYjlkY2YxNGYxOWUx
15
- ODJmNTkwMWFhNWZlYjdiODk0NjIzMzE1YmY2ZDQzYTZlZjc5NjU=
13
+ YTBjNzEyMjg3ZjdjZTcyYzY0NzRmYWM5MTNkNDdjZTViY2QyN2YzYTdhNzg3
14
+ YmEyNzMwMzI5ZGM5Y2U5ZDI3YzVkZTFkZTM5OTRhYTM2MDZiZDJlMDA3Zjlm
15
+ NjM3MDYyOWQzMDg1YWU0ZGZmM2Q1NjVlZDhhOWFmY2I5YzA4Nzg=
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module MagicRecipes
3
- VERSION = "0.0.36"
3
+ VERSION = "0.0.37"
4
4
  end
5
5
  end
@@ -23,7 +23,8 @@ check process <%= sidekiq_service_name(idx) %>
23
23
  stop program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ; bundle exec sidekiqctl stop <%= pid_file %>' " with timeout <%= fetch(:monit_sidekiq_timeout_sec, 90) %> seconds
24
24
  group sidekiq-<%= fetch(:sidekiq_monit_group, fetch(:application)) %>-<%= fetch(:stage) %>
25
25
  if does not exist then alert
26
- if totalmem is greater than <%= fetch( :monit_sidekiq_totalmem_mb, 300 ) %> MB for 2 cycles then restart
26
+ if totalmem > <%= fetch( :monit_sidekiq_totalmem_mb, 300 ).to_i * .80 %> MB then alert
27
+ if totalmem > <%= fetch( :monit_sidekiq_totalmem_mb, 300 ) %> MB for 2 cycles then restart
27
28
  if 3 restarts within 5 cycles then timeout
28
29
  # alert <%= fetch(:monit_mail_to) %> only on { pid }
29
30
  if 2 restarts within 3 cycles then alert
@@ -5,7 +5,9 @@
5
5
  start program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ;<% if fetch(:monit_thin_with_secret) %> export SECRET_KEY_BASE=<%= fetch(:secrets_key_base) %>; export <%= fetch(:secrets_key_name) %>=<%= fetch(:secrets_key_base) %>;<% end %> bundle exec thin start -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
6
6
  stop program = "/bin/su - <%= @role.user %> -c 'cd <%= current_path %> ; bundle exec thin stop -C config/thin_app_<%= fetch(:stage) %>.yml -o <%= n %>' "
7
7
  if does not exist then alert
8
- if mem > <%= fetch( :monit_thin_totalmem_mb, 300 ) %> MB for 1 cycles then restart
8
+ if mem > <%= fetch( :monit_thin_totalmem_mb, 300 ).to_i * .80 %> MB then alert
9
+ if mem > <%= fetch( :monit_thin_totalmem_mb, 300 ) %> MB for 2 cycles then restart
10
+ if cpu > 50% then alert
9
11
  if cpu > 50% for 3 cycles then restart
10
12
  if 5 restarts within 5 cycles then timeout
11
13
  # alert <%= fetch(:monit_mail_to) %> only on { pid }
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.36
4
+ version: 0.0.37
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-06-14 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails