Skip to content

Commit

Permalink
appengine: Check only if app installed and running
Browse files Browse the repository at this point in the history
Check only if app is installed and running at the "is app running" check
at the beginning of each update cycle. Whether app blobs are present&OK
or not does NOT impact a properly installed and running app.
Moreover, after "is app running" check, the aklite daemon checks whether
all enabled apps (including the "reset" apps") are fully fetched. We
need this check to make sure a user can switch (turn on/off) apps even
if offline mdoe.
Therefore, this change removes the redundant check whether all app blobs
are fetched&OK called at the "is app running" check.

Signed-off-by: Mike Sul <[email protected]>
  • Loading branch information
mike-sul committed Dec 2, 2024
1 parent b9f64c0 commit a9e0111
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/docker/restorableappengine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ bool RestorableAppEngine::isRunning(const App& app) const {
bool res{false};

try {
res = isAppFetched(app) && isAppInstalled(app) &&
isRunning(app, (install_root_ / app.name / ComposeFile).string(), docker_client_);
res = isAppInstalled(app) && isRunning(app, (install_root_ / app.name / ComposeFile).string(), docker_client_);
} catch (const std::exception& exc) {
LOG_WARNING << "App: " << app.name << ", cannot check whether App is running: " << exc.what();
}
Expand Down

0 comments on commit a9e0111

Please sign in to comment.