Skip to content

app: Introduce separate method for post initialization operations

Sunil Mohan Adapa requested to merge sunilmohan/freedombox:split-app-init into master

This fixes the outstanding issue with --list-dependencies. Instead of undoing the small change in usage of Packages() component that introduced this issue, I thought about fixing it properly and move us forward in our components architecture changes.

The problem occurs because because of the various Django DB operations that were happening in the app initialization. This can be avoided if the app building (creating components) is completed separated from rest of the initialization.

With these changes, I was able to test that on stable container and testing container, running --list-depenedencies (as root/plinth users) with/without presence of secret key file and plinth database works properly. Listing is also quite faster now.

If the problem still occurs in some environments, we can even drop web_framework.init(read_only=True) during list-dependencies operation.

Merge request reports

Loading