Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
- Upgraded gems:
- rails-html-sanitizer, sqlite3, websocket-driver
- Bugs fixes:
- Logs: index the logs table so progress lookups and cleanup stay fast as it grows
- Uploads/Exports: retry progress polling automatically after a failed request, and show an error if it keeps failing
- [entity]:
- [future tense verb] [bug fix]
- Bug tracker items:
Expand Down
14 changes: 13 additions & 1 deletion app/assets/javascripts/hera/modules/console_updater.js.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@ConsoleUpdater =
jobId: ''
parsing: false
failureCount: 0
maxFailures: 5

updateConsole: ->
unless ConsoleUpdater.parsing
Expand All @@ -21,4 +23,14 @@
{item_id: ConsoleUpdater.jobId, after: after},
null,
'script'
)
).done(->
# Reset on every success so the cap only trips on consecutive failures,
# not ones accumulated over the whole polling session.
ConsoleUpdater.failureCount = 0
).fail ->
ConsoleUpdater.failureCount += 1

if ConsoleUpdater.failureCount < ConsoleUpdater.maxFailures
setTimeout(ConsoleUpdater.updateConsole, 2000)
else
$('#console').append('<p class="log text-error">Lost connection while checking progress. Please refresh the page to check the current status.</p>')
5 changes: 5 additions & 0 deletions db/migrate/20260722163331_add_index_to_logs_on_uid.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddIndexToLogsOnUid < ActiveRecord::Migration[8.0]
def change
add_index :logs, :uid
end
end
3 changes: 2 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading