From 4a9d877724311c32f36f5a82be5d59bd14a7393f Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 27 Sep 2015 22:53:41 +0530 Subject: [PATCH] owncloud: Perform setup synchronously Earlier, installation of the ownCloud package was performed as part of setup process. It took time and hence the action was done asynchronously. Now, however, package manager takes care of this. To avoid any potential race conditions with the user accessing ownCloud before it is setup, perform the setup synchronously. --- plinth/modules/owncloud/owncloud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/modules/owncloud/owncloud.py b/plinth/modules/owncloud/owncloud.py index a99bb893d..599d7be83 100644 --- a/plinth/modules/owncloud/owncloud.py +++ b/plinth/modules/owncloud/owncloud.py @@ -54,7 +54,7 @@ def init(): def on_install(): """Tasks to run after package install.""" - actions.superuser_run('owncloud-setup', ['enable'], async=True) + actions.superuser_run('owncloud-setup', ['enable']) service.notify_enabled(None, True) @@ -100,7 +100,7 @@ def _apply_changes(request, old_status, new_status): messages.success(request, _('ownCloud disabled')) option = 'noenable' - actions.superuser_run('owncloud-setup', [option], async=True) + actions.superuser_run('owncloud-setup', [option]) # Send a signal to other modules that the service is # enabled/disabled