Skip to content

Commit

Permalink
Merge pull request #12294 from eduardoj/live_build_log_fix_finished
Browse files Browse the repository at this point in the history
Don't rely on other conditions to stop a live log
  • Loading branch information
hennevogel committed Mar 14, 2022
2 parents 73dfdae + 819154a commit f870ef9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/api/app/controllers/webui/package_controller.rb
Expand Up @@ -468,10 +468,7 @@ def update_build_log

@log_chunk = get_log_chunk(@project, @package_name, @repo, @arch, chunk_start, chunk_end)
# retry the last chunk again, because build compare overwrites last log lines
if @log_chunk.length.zero? && !@first_request && !@finished
@log_chunk = get_log_chunk(@project, @package_name, @repo, @arch, chunk_start, chunk_end)
@finished = true
end
@log_chunk = get_log_chunk(@project, @package_name, @repo, @arch, chunk_start, chunk_end) if @log_chunk.length.zero? && !@first_request && !@finished

old_offset = @offset
@offset = [chunk_end, @size].min
Expand Down

0 comments on commit f870ef9

Please sign in to comment.