kopia lustrzana https://github.com/OpenDroneMap/WebODM
Fixed off-by-one error, newlines handling
rodzic
210ea4ed5e
commit
64e7847d11
|
@ -111,7 +111,7 @@ class TaskViewSet(viewsets.ViewSet):
|
|||
|
||||
line_num = max(0, int(request.query_params.get('line', 0)))
|
||||
output = task.console_output or ""
|
||||
return Response('\n'.join(output.split('\n')[line_num:]))
|
||||
return Response('\n'.join(output.rstrip().split('\n')[line_num:]))
|
||||
|
||||
|
||||
def list(self, request, project_pk=None):
|
||||
|
|
|
@ -422,8 +422,10 @@ class Task(models.Model):
|
|||
self.processing_time = info["processingTime"]
|
||||
self.status = info["status"]["code"]
|
||||
|
||||
current_lines_count = len(self.console_output.split("\n")) - 1
|
||||
self.console_output += self.processing_node.get_task_console_output(self.uuid, current_lines_count)
|
||||
current_lines_count = len(self.console_output.split("\n"))
|
||||
console_output = self.processing_node.get_task_console_output(self.uuid, current_lines_count)
|
||||
if len(console_output) > 0:
|
||||
self.console_output += console_output + '\n'
|
||||
|
||||
if "errorMessage" in info["status"]:
|
||||
self.last_error = info["status"]["errorMessage"]
|
||||
|
|
Ładowanie…
Reference in New Issue