Reference documentation and code samples for the Batch V1 API class Google::Cloud::Batch::V1::Runnable.
Runnable describes instructions for executing a specific script or container as part of a Task.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#always_run
def always_run() -> ::Boolean
-
(::Boolean) — By default, after a Runnable fails, no further Runnable are executed. This
flag indicates that this Runnable must be run even if the Task has already
failed. This is useful for Runnables that copy output files off of the VM
or for debugging.
The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.
#always_run=
def always_run=(value) -> ::Boolean
-
value (::Boolean) — By default, after a Runnable fails, no further Runnable are executed. This
flag indicates that this Runnable must be run even if the Task has already
failed. This is useful for Runnables that copy output files off of the VM
or for debugging.
The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.
-
(::Boolean) — By default, after a Runnable fails, no further Runnable are executed. This
flag indicates that this Runnable must be run even if the Task has already
failed. This is useful for Runnables that copy output files off of the VM
or for debugging.
The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.
#background
def background() -> ::Boolean
-
(::Boolean) — Normally, a runnable that doesn't exit causes its task to fail. However,
you can set this field to
true
to configure a background runnable. Background runnables are allowed continue running in the background while the task executes subsequent runnables. For example, background runnables are useful for providing services to other runnables or providing debugging-support tools like SSH servers.Specifically, background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as task failures.
#background=
def background=(value) -> ::Boolean
-
value (::Boolean) — Normally, a runnable that doesn't exit causes its task to fail. However,
you can set this field to
true
to configure a background runnable. Background runnables are allowed continue running in the background while the task executes subsequent runnables. For example, background runnables are useful for providing services to other runnables or providing debugging-support tools like SSH servers.Specifically, background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as task failures.
-
(::Boolean) — Normally, a runnable that doesn't exit causes its task to fail. However,
you can set this field to
true
to configure a background runnable. Background runnables are allowed continue running in the background while the task executes subsequent runnables. For example, background runnables are useful for providing services to other runnables or providing debugging-support tools like SSH servers.Specifically, background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as task failures.
#barrier
def barrier() -> ::Google::Cloud::Batch::V1::Runnable::Barrier
- (::Google::Cloud::Batch::V1::Runnable::Barrier) — Barrier runnable.
#barrier=
def barrier=(value) -> ::Google::Cloud::Batch::V1::Runnable::Barrier
- value (::Google::Cloud::Batch::V1::Runnable::Barrier) — Barrier runnable.
- (::Google::Cloud::Batch::V1::Runnable::Barrier) — Barrier runnable.
#container
def container() -> ::Google::Cloud::Batch::V1::Runnable::Container
- (::Google::Cloud::Batch::V1::Runnable::Container) — Container runnable.
#container=
def container=(value) -> ::Google::Cloud::Batch::V1::Runnable::Container
- value (::Google::Cloud::Batch::V1::Runnable::Container) — Container runnable.
- (::Google::Cloud::Batch::V1::Runnable::Container) — Container runnable.
#display_name
def display_name() -> ::String
- (::String) — Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
#display_name=
def display_name=(value) -> ::String
- value (::String) — Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
- (::String) — Optional. DisplayName is an optional field that can be provided by the caller. If provided, it will be used in logs and other outputs to identify the script, making it easier for users to understand the logs. If not provided the index of the runnable will be used for outputs.
#environment
def environment() -> ::Google::Cloud::Batch::V1::Environment
- (::Google::Cloud::Batch::V1::Environment) — Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
#environment=
def environment=(value) -> ::Google::Cloud::Batch::V1::Environment
- value (::Google::Cloud::Batch::V1::Environment) — Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
- (::Google::Cloud::Batch::V1::Environment) — Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
#ignore_exit_status
def ignore_exit_status() -> ::Boolean
-
(::Boolean) — Normally, a runnable that returns a non-zero exit status fails and causes
the task to fail. However, you can set this field to
true
to allow the task to continue executing its other runnables even if this runnable fails.
#ignore_exit_status=
def ignore_exit_status=(value) -> ::Boolean
-
value (::Boolean) — Normally, a runnable that returns a non-zero exit status fails and causes
the task to fail. However, you can set this field to
true
to allow the task to continue executing its other runnables even if this runnable fails.
-
(::Boolean) — Normally, a runnable that returns a non-zero exit status fails and causes
the task to fail. However, you can set this field to
true
to allow the task to continue executing its other runnables even if this runnable fails.
#labels
def labels() -> ::Google::Protobuf::Map{::String => ::String}
- (::Google::Protobuf::Map{::String => ::String}) — Labels for this Runnable.
#labels=
def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}
- value (::Google::Protobuf::Map{::String => ::String}) — Labels for this Runnable.
- (::Google::Protobuf::Map{::String => ::String}) — Labels for this Runnable.
#script
def script() -> ::Google::Cloud::Batch::V1::Runnable::Script
- (::Google::Cloud::Batch::V1::Runnable::Script) — Script runnable.
#script=
def script=(value) -> ::Google::Cloud::Batch::V1::Runnable::Script
- value (::Google::Cloud::Batch::V1::Runnable::Script) — Script runnable.
- (::Google::Cloud::Batch::V1::Runnable::Script) — Script runnable.
#timeout
def timeout() -> ::Google::Protobuf::Duration
- (::Google::Protobuf::Duration) — Timeout for this Runnable.
#timeout=
def timeout=(value) -> ::Google::Protobuf::Duration
- value (::Google::Protobuf::Duration) — Timeout for this Runnable.
- (::Google::Protobuf::Duration) — Timeout for this Runnable.