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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f70731b11f532a8b696a9a5d0b856aaaa96fd874
|
4
|
+
data.tar.gz: 15d133308c41ab3d8e816a1d11af74d53252e61d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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: '
|
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
|
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
|
data/lib/hot_catch/version.rb
CHANGED
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/
|
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.
|
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/
|
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
|