mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-25 08:43:36 +00:00
diagnostics: Don't store list of app objects with results
current_results['apps'] was not being used anywhere. Make are_results_available() check more specific, and to align with what is stored in the database. Tests: - Run full diagnostics and check the results. - Restart plinth, and check that the diagnostic results are loaded from the database. Helps: #2410 Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
7ffc5233c1
commit
6f0897e702
@ -104,7 +104,6 @@ def _run_on_all_enabled_modules():
|
||||
|
||||
with results_lock:
|
||||
current_results = {
|
||||
'apps': [],
|
||||
'results': collections.OrderedDict(),
|
||||
'progress_percentage': 0,
|
||||
'exception': None,
|
||||
@ -125,8 +124,6 @@ def _run_on_all_enabled_modules():
|
||||
apps.append((app.app_id, app))
|
||||
current_results['results'][app.app_id] = {'id': app.app_id}
|
||||
|
||||
current_results['apps'] = apps
|
||||
|
||||
for current_index, (app_id, app) in enumerate(apps):
|
||||
app_results = {
|
||||
'diagnosis': [],
|
||||
@ -330,7 +327,7 @@ def _run_diagnostics():
|
||||
def are_results_available():
|
||||
"""Return whether diagnostic results are available."""
|
||||
with results_lock:
|
||||
results = current_results
|
||||
results = current_results.get('results')
|
||||
|
||||
if not results:
|
||||
results = kvstore.get_default('diagnostics_results', '{}')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user