fix: rebuild batches after retry and preserve log page on read failure
This commit is contained in:
1 parent
2ddfd1a0b2
commit
032a80ac27
4 files changed
+117
-3
No files matched your search
@@ -554,8 +554,14 @@ class TrialTaskCenterWindow(QMainWindow):
|
||||
def _retry_failed(self):
|
||||
if self.run_panel.retry_button.isEnabled():
|
||||
task_id = self._task_id
|
||||
group_id = self._context.task.group_id
|
||||
def prepared(_):
|
||||
# The task now owns a new retry handoff. Its old batch checkpoint
|
||||
# still contains a terminal failure and must remain historical.
|
||||
self._project_queues.pop(group_id, None)
|
||||
self._load_task_data()
|
||||
self._run_async(lambda: self.service.prepare_failed_quick_run(task_id),
|
||||
lambda _: self._load_task_data(), self.run_panel.retry_button, expected_task_id=task_id)
|
||||
prepared, self.run_panel.retry_button, expected_task_id=task_id)
|
||||
|
||||
def _start_new_round(self):
|
||||
if not self.run_panel.new_round_button.isEnabled():
|
||||
|
||||
@@ -76,12 +76,10 @@ class TaskLogPresenter(QObject):
|
||||
|
||||
def latest(self, *, force=False):
|
||||
if self.panel.log_dialog is not None and self.task_id and (force or not self.query.current_busy):
|
||||
self.history = False
|
||||
self._request('latest')
|
||||
|
||||
def older(self):
|
||||
if self.panel.log_dialog is not None and self.task_id and self.has_older and not self.query.current_busy:
|
||||
self.history = True
|
||||
self._request('older')
|
||||
|
||||
def _request(self, mode):
|
||||
@@ -97,6 +95,9 @@ class TaskLogPresenter(QObject):
|
||||
if dialog is None:
|
||||
return
|
||||
page, text, result_rows = result
|
||||
# Mode and cursors describe the page actually on screen. Commit them
|
||||
# together only when navigation succeeds; failure keeps the old page.
|
||||
self.history = mode == 'older'
|
||||
if mode == 'poll' and not page.reset:
|
||||
if text:
|
||||
self._text = '\n'.join(part for part in (self._text, text) if part)
|
||||
|
||||
Reference in new issue
Block a user