Class: Google::Apis::BatchV1::Runnable
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::Runnable
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb
Overview
Runnable describes instructions for executing a specific script or container as part of a Task.
Instance Attribute Summary collapse
-
#always_run ⇒ Boolean
(also: #always_run?)
By default, after a Runnable fails, no further Runnable are executed.
-
#background ⇒ Boolean
(also: #background?)
This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables.
-
#barrier ⇒ Google::Apis::BatchV1::Barrier
Barrier runnable blocks until all tasks in a taskgroup reach it.
-
#container ⇒ Google::Apis::BatchV1::Container
Container runnable.
-
#environment ⇒ Google::Apis::BatchV1::Environment
An Environment describes a collection of environment variables to set when executing Tasks.
-
#ignore_exit_status ⇒ Boolean
(also: #ignore_exit_status?)
Normally, a non-zero exit status causes the Task to fail.
-
#labels ⇒ Hash<String,String>
Labels for this Runnable.
-
#script ⇒ Google::Apis::BatchV1::Script
Script runnable.
-
#timeout ⇒ String
Timeout for this Runnable.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Runnable
constructor
A new instance of Runnable.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Runnable
Returns a new instance of Runnable.
1926 1927 1928 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1926 def initialize(**args) update!(**args) end |
Instance Attribute Details
#always_run ⇒ Boolean Also known as: always_run?
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.
Corresponds to the JSON property alwaysRun
1877 1878 1879 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1877 def always_run @always_run end |
#background ⇒ Boolean Also known as: background?
This flag allows a Runnable to continue running in the background while the
Task executes subsequent Runnables. This is useful to provide services to
other Runnables (or to provide debugging support tools like SSH servers).
Corresponds to the JSON property background
1885 1886 1887 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1885 def background @background end |
#barrier ⇒ Google::Apis::BatchV1::Barrier
Barrier runnable blocks until all tasks in a taskgroup reach it.
Corresponds to the JSON property barrier
1891 1892 1893 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1891 def @barrier end |
#container ⇒ Google::Apis::BatchV1::Container
Container runnable.
Corresponds to the JSON property container
1896 1897 1898 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1896 def container @container end |
#environment ⇒ Google::Apis::BatchV1::Environment
An Environment describes a collection of environment variables to set when
executing Tasks.
Corresponds to the JSON property environment
1902 1903 1904 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1902 def environment @environment end |
#ignore_exit_status ⇒ Boolean Also known as: ignore_exit_status?
Normally, a non-zero exit status causes the Task to fail. This flag allows
execution of other Runnables to continue instead.
Corresponds to the JSON property ignoreExitStatus
1908 1909 1910 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1908 def ignore_exit_status @ignore_exit_status end |
#labels ⇒ Hash<String,String>
Labels for this Runnable.
Corresponds to the JSON property labels
1914 1915 1916 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1914 def labels @labels end |
#script ⇒ Google::Apis::BatchV1::Script
Script runnable.
Corresponds to the JSON property script
1919 1920 1921 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1919 def script @script end |
#timeout ⇒ String
Timeout for this Runnable.
Corresponds to the JSON property timeout
1924 1925 1926 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1924 def timeout @timeout end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1931 def update!(**args) @always_run = args[:always_run] if args.key?(:always_run) @background = args[:background] if args.key?(:background) @barrier = args[:barrier] if args.key?(:barrier) @container = args[:container] if args.key?(:container) @environment = args[:environment] if args.key?(:environment) @ignore_exit_status = args[:ignore_exit_status] if args.key?(:ignore_exit_status) @labels = args[:labels] if args.key?(:labels) @script = args[:script] if args.key?(:script) @timeout = args[:timeout] if args.key?(:timeout) end |