mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Refrain from issuing the summary twice.
Now that we have a proper flush system for reporting the summary at the proper time (see 7c5396f0975be405910d66f4b5aedc89acd75c1d), refrain from also taking care of the reporting when stopping the monitor. Adapt the regression driver code to flush the summary after loading the expected data, which also provides better output. When the summary output is sent to a file, that would also create a backup file and replace our summary with an empty new file at monitor stop... Fixes #499.
This commit is contained in:
parent
b239e6b556
commit
21a10235db
@ -68,7 +68,7 @@
|
||||
:into expected-data-target
|
||||
:options '(:truncate t)
|
||||
:start-logger nil
|
||||
:flush-summary nil)
|
||||
:flush-summary t)
|
||||
|
||||
;; now compare both
|
||||
(with-pgsql-connection (target-conn)
|
||||
|
||||
@ -176,16 +176,13 @@
|
||||
(stop
|
||||
(cl-log:log-message :info "Stopping monitor")
|
||||
|
||||
;; report the summary now
|
||||
(destructuring-bind (&key pre data post) *sections*
|
||||
(unless (and (null pre) (null data) (null post))
|
||||
(report-current-summary start-time)))
|
||||
|
||||
;; time to shut down the logger?
|
||||
(when (stop-stop-logger event)
|
||||
(pgloader.logs:stop-logger)))
|
||||
|
||||
(report-summary
|
||||
(cl-log:log-message :log "report summary ~@[reset~]"
|
||||
(report-summary-reset event))
|
||||
(report-current-summary start-time)
|
||||
|
||||
(when (report-summary-reset event)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user