Browsing Chinese (Simplified) translation

77 of 815 results
77.

The set-health command is called from within a snap to inform the system of the
snap's overall health.

It can be called from any hook, and even from the apps themselves. A snap can
optionally provide a 'check-health' hook to better manage these calls, which is
then called periodically and with increased frequency while the snap is
"unhealthy". Any health regression will issue a warning to the user.

Note: the health is of the snap only, not of the apps it contains; it’s up to
the snap developer to determine how the health of the individual apps is
reflected in the overall health of the snap.

status can be one of:

- okay: the snap is healthy. This status takes no message and no code.

- waiting: a resource needed by the snap (e.g. a device, network, or service) is
not ready and the user will need to wait. The message must explain what
resource is being waited for.

- blocked: something needs doing to unblock the snap (e.g. a service needs to be
configured); the message must be sufficient to point the user in the right
direction.

- error: something is broken; the message must explain what.
There are line breaks here. Each one represents a line break. Start a new line in the equivalent position in the translation.
There are leading/trailing spaces here. Each one represents a space character. Enter a space in the equivalent position in the translation.

set-health 命令是从 snap 内部调用的,用于向系统报告 snap 的整体健康状况。

它可以从任何钩子中调用,甚至从应用程序本身调用。Snap 可以选择提供一个 “check-health” 钩子来更好地管理这些调用,当 Snap 处于“不健康”状态时,将定期调用该钩子并增加调用频率。任何健康回归都会向用户发出警告。

注意:健康状态仅适用于Snap本身,而不适用于其中包含的应用程序的健康状况;Snap开发人员需要确定如何反映单个应用程序的健康状况对 Snap 整体健康状况的影响。

状态可以是以下之一:

- okay: Snap很健康。此状态不需要消息和代码。

- waiting: Snap 需要的资源(例如设备、网络或服务)尚未准备好,用户需要等待。消息必须解释正在等待什么资源。

- blocked: 有些事情需要做才能解除Snap的阻塞(例如需要配置服务);消息必须足以指导用户朝正确的方向前进。

- error: 出现了问题,消息必须解释是什么问题。
Translated by Luke Na
Located in overlord/hookstate/ctlcmd/health.go:35
77 of 815 results

This translation is managed by Ubuntu Simplified Chinese Translators, assigned by Ubuntu Translators.

You are not logged in. Please log in to work on translations.