mirror of
https://github.com/discourse/discourse.git
synced 2025-07-12 18:32:40 +08:00
FIX: Sometimes not all output of psql was logged during restores
There was a race condition which could prevent Discourse from logging the last couple of lines of output from psql.
This commit is contained in:

committed by
Robin Ward

parent
43a41f3928
commit
f69e5a4d7e
@ -70,7 +70,7 @@ module BackupRestore
|
||||
|
||||
log_thread = Thread.new do
|
||||
RailsMultisite::ConnectionManagement::establish_connection(db: @current_db)
|
||||
while psql_running
|
||||
while psql_running || !logs.empty?
|
||||
message = logs.pop.strip
|
||||
log(message) if message.present?
|
||||
end
|
||||
|
Reference in New Issue
Block a user