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 2019-02-24 20:01:32 -08:00 committed by James Valleroy
parent d51a2b6865
commit 871215abb0
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

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.