setup: Rush force upgrade in development mode

- So that developers don't have to wait a long time to see the changes.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2019-02-26 06:24:25 -05:00
1 parent d51a2b6865
commit 871215abb0
1 file changed
+5
+5
View File
@@ -425,6 +425,11 @@ class ForceUpgrader():
class PermanentFailure(Exception):
"""Raised when upgrade fails and there is nothing more we wish to do."""
def __init__(self):
"""Initialize the force upgrader."""
if plinth.cfg.develop:
self.UPGRADE_ATTEMPT_WAIT_SECONDS = 10
def on_package_cache_updated(self):
"""Trigger upgrades when notified about changes to package cache.