hot_catch 0.1.5 → 0.1.5.1
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: 6fac3fb866a894a8ebc659e2591cad9c8b1e74fa
|
4
|
+
data.tar.gz: 2805d10c532f13b9b4a7967e90f940610d99d459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79e8587e8520edb3c8042c96c24ae2ca107296e0ba94c4b223fac032ed1e5ce79f4190b40894fd207f5fc7912fb965c5f4f2c3057cc3295658713fce4dfe1e04
|
7
|
+
data.tar.gz: ac119a9263d715319a2ad22321b4fe456caafc3ee33eff63c4c4da0e8e7d734a00c0dd17f56326deba682aa8eb209c21ba8447cbdc47f92f202685eadc59f6d1
|
@@ -34,6 +34,7 @@ module HotCatch
|
|
34
34
|
|
35
35
|
def add_initialize_file_for_sender_logs
|
36
36
|
create_file "config/initializers/hot_catch_sender_logs.rb" do
|
37
|
+
"require 'sidekiq-cron'\n" +
|
37
38
|
"Rails.application.config.sender_logs = HotCatch::MakeHttpsRequest.new\n" +
|
38
39
|
"Sidekiq::Cron::Job.create(name: 'NginxWorker - every 5min', cron: '*/5 * * * *', class: 'NginxWorker') # execute at every 5 minutes, ex: 12:05, 12:10, 12:15...etc\n"
|
39
40
|
end
|
@@ -2,7 +2,7 @@ require 'time'
|
|
2
2
|
|
3
3
|
def copy_nginx_logs(from_time = (Time.now() - 5 * 60), input_file = 'log/nginx.access.log')
|
4
4
|
str = ""
|
5
|
-
if File.open(input_file, 'r'){|file| str = file.readlines}
|
5
|
+
if File.exist?(input_file) && File.open(input_file, 'r'){|file| str = file.readlines}
|
6
6
|
ind = nil
|
7
7
|
|
8
8
|
for i in 0 ... str.size
|
data/lib/hot_catch/version.rb
CHANGED