mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
operation: Add unique ID for each operation
- Helps in retrieving an operation that is currently running. - Prevent starting an operation that is already running. Tests: - Unit tests work. - Installing, uninstalling an app works. - For upgrading an app works. - Running background diagnostics works. - Updating tor configuration works. - Updating torproxy configuration works. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
79f36e6a0c
commit
a233bbfd9b
6 files changed
+85
-48
No files matched your search
@@ -264,8 +264,9 @@ def _warn_about_low_ram_space(request):
|
||||
def _start_background_diagnostics(request):
|
||||
"""Start daily diagnostics as a background operation."""
|
||||
operation = operation_module.manager.new(
|
||||
'diagnostics', gettext_noop('Running background diagnostics'),
|
||||
_run_background_diagnostics, [], show_message=False,
|
||||
op_id='diagnostics-full', app_id='diagnostics',
|
||||
name=gettext_noop('Running background diagnostics'),
|
||||
target=_run_background_diagnostics, [], show_message=False,
|
||||
show_notification=False)
|
||||
operation.join()
|
||||
|
||||
|
||||
Reference in new issue
Block a user