-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow retrieving logs of apps in crashed state (#14419)
- Loading branch information
Showing
5 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
import enum | ||
|
||
from catalog_reader.library import RE_VERSION # noqa | ||
from middlewared.plugins.apps_images.utils import normalize_reference # noqa | ||
from middlewared.plugins.apps.schema_utils import CONTEXT_KEY_NAME # noqa | ||
from middlewared.plugins.apps.utils import IX_APPS_MOUNT_PATH, PROJECT_PREFIX, run # noqa | ||
|
||
|
||
class AppState(enum.Enum): | ||
CRASHED = 'CRASHED' | ||
DEPLOYING = 'DEPLOYING' | ||
RUNNING = 'RUNNING' | ||
STOPPED = 'STOPPED' | ||
|
||
|
||
class ContainerState(enum.Enum): | ||
EXITED = 'exited' | ||
RUNNING = 'running' | ||
STARTING = 'starting' | ||
|
||
|
||
def get_app_name_from_project_name(project_name: str) -> str: | ||
return project_name[len(PROJECT_PREFIX):] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters