hot_catch 0.1.6.1 → 0.1.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b38dfaafae84edd22383bef751198ef839a9744
4
- data.tar.gz: 77b85ca8d3b6ab1dff8a6cc250444def2f0d3b25
3
+ metadata.gz: f70731b11f532a8b696a9a5d0b856aaaa96fd874
4
+ data.tar.gz: 15d133308c41ab3d8e816a1d11af74d53252e61d
5
5
  SHA512:
6
- metadata.gz: 66f337e630fcbe01f0a6919b73a4ede2b1dc4fc18c55541ba2a4a51c5fd4dc5acb3a8e6da2e7f1f43ee277185c2167ef56ebdfbf09dbda868b059869acc0f6f5
7
- data.tar.gz: 2efb4b9df0ee8a6e16687379152edb9b94cfa5b99b73b54fb13755f70e38f0a9ebf3c00cccaa20eec1ce8b10cf2b24d7773486381dad4a30f08ed2f18859c492
6
+ metadata.gz: 5107635fb617db5ce4f44976ed253c6deff86f1fb4a27b2829a46bf519941783a83375199e6b04a99c3da981c3c68742eae8d6720f1d06460d944eec71aab7c3
7
+ data.tar.gz: b7f5d8aa157b8c9837d8d3913168f99988f222254a555d65e776d28fe1d731372b2dd27ee45c1287c4c30fbb8e406ce81441e4abf8f7e7d7366aade373b161f6
@@ -36,8 +36,7 @@ module HotCatch
36
36
  create_file "config/initializers/hot_catch_sender_logs.rb" do
37
37
  "require 'sidekiq-cron'\n" +
38
38
  "Rails.application.config.sender_logs = HotCatch::MakeHttpsRequest.new\n" +
39
- "Sidekiq::Cron::Job.create(name: 'NginxWorker - every 5min', cron: '*/5 * * * *', class: 'NginxWorker')\n" +
40
- "Sidekiq::Cron::Job.create(name: 'NginxWorker - every 5min', cron: '*/1 * * * *', class: 'SystemWorker')\n"
39
+ "Sidekiq::Cron::Job.create(name: 'NginxSystemWorker - every 1min', cron: '*/1 * * * *', class: 'NginxSystemWorker')\n" +
41
40
  end
42
41
  end
43
42
 
@@ -1,11 +1,15 @@
1
1
  require 'sidekiq'
2
- # Отвечает за сбор и отправку логов системы
3
- class SystemWorker
2
+ # Отвечает за сбор и отправку логов Nginx и системы
3
+ class NginxSystemWorker
4
4
  include Sidekiq::Worker
5
5
  sidekiq_options :retry => false
6
6
  def perform
7
7
  logs = get_system_metrics()
8
8
  sender = HotCatch::MakeHttpsRequest.new
9
9
  sender.system_g_log(logs)
10
+
11
+ logs = get_nginx_logs()
12
+ sender = HotCatch::MakeHttpsRequest.new
13
+ sender.nginx_g_log(logs)
10
14
  end
11
15
  end
@@ -1,3 +1,3 @@
1
1
  module HotCatch
2
- VERSION = '0.1.6.1'
2
+ VERSION = '0.1.6.2'
3
3
  end
data/lib/hot_catch.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  module HotCatch
2
2
  require 'hot_catch/hard_worker'
3
- require 'hot_catch/nginx_worker'
4
- require 'hot_catch/system_worker'
3
+ require 'hot_catch/nginx_system_worker'
5
4
  require 'hot_catch/custom_log_subscribers.rb'
6
5
  require 'hot_catch/get_nginx_logs.rb'
7
6
  require 'hot_catch/get_system_metrics'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot_catch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.1
4
+ version: 0.1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davhot
@@ -70,8 +70,7 @@ files:
70
70
  - lib/hot_catch/get_system_metrics.rb
71
71
  - lib/hot_catch/hard_worker.rb
72
72
  - lib/hot_catch/hot_catch_logger.rb
73
- - lib/hot_catch/nginx_worker.rb
74
- - lib/hot_catch/system_worker.rb
73
+ - lib/hot_catch/nginx_system_worker.rb
75
74
  - lib/hot_catch/version.rb
76
75
  - lib/tasks/hot_catch_tasks.rake
77
76
  homepage: https://myhomepage.com
@@ -1,11 +0,0 @@
1
- require 'sidekiq'
2
- # Отвечает за сбор и отправку логов Nginx
3
- class NginxWorker
4
- include Sidekiq::Worker
5
- sidekiq_options :retry => false
6
- def perform
7
- logs = get_nginx_logs()
8
- sender = HotCatch::MakeHttpsRequest.new
9
- sender.nginx_g_log(logs)
10
- end
11
- end