Skip to content

Commit

Permalink
Don't retry requesting the last chunk
Browse files Browse the repository at this point in the history
It is unnecessary to repeat the request of a log chunk after reaching a
final state. This is a follow up to fixing the live build log not to
stop in a not final state.
  • Loading branch information
eduardoj committed Mar 14, 2022
1 parent b2338bc commit f59537b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/api/app/controllers/webui/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,6 @@ def update_build_log
end

@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
@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 f59537b

Please sign in to comment.