Project

General

Profile

Bug #59580 » 0001-mgr-restful-trim-reslts-finished-and-failed-lists-to.patch

Nitzan Mordechai, 09/21/2023 11:37 AM

View differences:

src/pybind/mgr/restful/module.py
import traceback
import socket
import fcntl
from typing import cast
from . import common
from . import context
......
self.waiting = commands_arrays[1:]
self.finished = []
self.failed = []
max_finished = cast(int, self.get_localized_module_option('max_finished', 100))
max_failed = cast(int, self.get_localized_module_option('max_failed', 100))
self.lock = threading.RLock()
if not len(commands_arrays):
......
if self.running[index].tag == tag:
if self.running[index].r == 0:
self.finished.append(self.running.pop(index))
self.finished = self.finished[:-self.max_finished]
else:
self.failed.append(self.running.pop(index))
self.failed = self.failed[:-self.max_failed]
return True
# No such tag found
(1-1/6)