groonga-query-log 1.6.1 → 1.6.2
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,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 292e6cac875522bbe44ce9e3ba9720662607e73e2caff72dbb64ef01b403c353
|
|
4
|
+
data.tar.gz: 7c8ca5a6868504360814aae0c8726cdcbe909ba1806aa8a4c99e1b5324b85087
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ba5b0df58160f31cee7f9acb675bbd5c79b4f878550b184112ca8b557b591007cf8d32477beb7455e21737924785dba8305c2242a7e267a0e12b67bd3c14de6
|
|
7
|
+
data.tar.gz: 5be7b4777f3153332cea06f6b942b121a4983136dcf6b804f8c0e699b43b2fe70636a7cd8a0da9f4c240a6d2103c0b316e96c8afab659821d40cf0c78a6ea1b2
|
data/doc/text/news.md
CHANGED
|
@@ -79,6 +79,7 @@ module GroongaQueryLog
|
|
|
79
79
|
mail_subject_on_failure: "Failure",
|
|
80
80
|
mail_from: "groonga-query-log@#{Socket.gethostname}",
|
|
81
81
|
mail_to: nil,
|
|
82
|
+
mail_only_on_failure: false,
|
|
82
83
|
smtp_server: "localhost",
|
|
83
84
|
smtp_auth_user: nil,
|
|
84
85
|
smtp_auth_password: nil,
|
|
@@ -387,6 +388,11 @@ module GroongaQueryLog
|
|
|
387
388
|
"(#{@notifier_options[:mail_subject_on_failure]})") do |subject|
|
|
388
389
|
@notifier_options[:mail_subject_on_failure] = subject
|
|
389
390
|
end
|
|
391
|
+
parser.on("--[no-]mail-only-on-failure",
|
|
392
|
+
"Send a notification e-mail only on failure",
|
|
393
|
+
"(#{@notifier_options[:mail_only_on_failure]})") do |boolean|
|
|
394
|
+
@notifier_options[:mail_only_on_failure] = boolean
|
|
395
|
+
end
|
|
390
396
|
parser
|
|
391
397
|
end
|
|
392
398
|
|
|
@@ -464,10 +470,13 @@ module GroongaQueryLog
|
|
|
464
470
|
formatted = format_elapsed_time(elapsed_time)
|
|
465
471
|
formatted << "The number of executed commands: #{n_executed_commands}\n"
|
|
466
472
|
if success
|
|
467
|
-
formatted << "Success
|
|
473
|
+
formatted << "Success"
|
|
474
|
+
formatted << " but leaked" if n_leaked_objects > 0
|
|
468
475
|
else
|
|
469
|
-
formatted << "Failure
|
|
476
|
+
formatted << "Failure"
|
|
477
|
+
formatted << " and leaked" if n_leaked_objects > 0
|
|
470
478
|
end
|
|
479
|
+
formatted << "\n"
|
|
471
480
|
unless n_leaked_objects.zero?
|
|
472
481
|
formatted << "\nLeaked: #{n_leaked_objects}"
|
|
473
482
|
end
|
|
@@ -612,12 +621,12 @@ module GroongaQueryLog
|
|
|
612
621
|
input.close
|
|
613
622
|
begin
|
|
614
623
|
pid, status = Process.waitpid2(pid)
|
|
615
|
-
filter_pid,
|
|
624
|
+
filter_pid, _filter_status = Process.waitpid2(filter_pid)
|
|
616
625
|
rescue Interrupt
|
|
617
626
|
Process.kill(:TERM, pid)
|
|
618
627
|
Process.kill(:TERM, filter_pid)
|
|
619
628
|
pid, status = Process.waitpid2(pid)
|
|
620
|
-
filter_pid,
|
|
629
|
+
filter_pid, _filter_status = Process.waitpid2(filter_pid)
|
|
621
630
|
end
|
|
622
631
|
end
|
|
623
632
|
else
|
|
@@ -897,6 +906,7 @@ module GroongaQueryLog
|
|
|
897
906
|
|
|
898
907
|
def notify_started
|
|
899
908
|
return unless @options[:mail_to]
|
|
909
|
+
return if @options[:mail_only_on_failure]
|
|
900
910
|
|
|
901
911
|
subject = @options[:mail_subject_on_start]
|
|
902
912
|
send_mail(subject, "")
|
|
@@ -907,6 +917,7 @@ module GroongaQueryLog
|
|
|
907
917
|
|
|
908
918
|
if success
|
|
909
919
|
subject = @options[:mail_subject_on_success]
|
|
920
|
+
return if @options[:mail_only_on_failure]
|
|
910
921
|
else
|
|
911
922
|
subject = @options[:mail_subject_on_failure]
|
|
912
923
|
end
|
|
@@ -217,6 +217,7 @@ QUIT
|
|
|
217
217
|
:mail_to => "noreply@example.com",
|
|
218
218
|
:mail_subject_on_success => "Success",
|
|
219
219
|
:mail_subject_on_failure => "Failure",
|
|
220
|
+
:mail_only_on_failure => true,
|
|
220
221
|
:path => fixture_path("mail-notifier/failure.log"),
|
|
221
222
|
}
|
|
222
223
|
notifier = MailNotifier.new(options)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: groonga-query-log
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kouhei Sutou
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-05-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: charty
|