Class: Temporalio::Activity::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/activity/info.rb

Overview

Note:

WARNING: This class may have required parameters added to its constructor. Users should not instantiate this class or it may break in incompatible ways.

Information about an activity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#activity_idString

Returns ID for the activity.

Returns:

  • (String)

    ID for the activity.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#activity_typeString

Returns Type name for the activity.

Returns:

  • (String)

    Type name for the activity.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#attemptInteger

Returns Attempt the activity is on.

Returns:

  • (Integer)

    Attempt the activity is on.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#current_attempt_scheduled_timeTime

Returns When the current attempt was scheduled.

Returns:

  • (Time)

    When the current attempt was scheduled.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#heartbeat_timeoutFloat?

Returns Heartbeat timeout set by the caller.

Returns:

  • (Float, nil)

    Heartbeat timeout set by the caller.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#local?Boolean

Returns Whether the activity is a local activity or not.

Returns:

  • (Boolean)

    Whether the activity is a local activity or not.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#priorityPriority

Returns The priority of this activity.

Returns:

  • (Priority)

    The priority of this activity.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#raw_heartbeat_detailsArray<Converter::RawValue>

Returns Raw details from the last heartbeat of the last attempt. Can use #heartbeat_details to get lazily-converted values.

Returns:

  • (Array<Converter::RawValue>)

    Raw details from the last heartbeat of the last attempt. Can use #heartbeat_details to get lazily-converted values.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#retry_policyRetryPolicy?

Returns Retry policy for the activity. Note that the server may have set a different policy than the one provided when scheduling the activity. If the value is None, it means the server didn’t send information about retry policy (e.g. due to old server version), but it may still be defined server-side.

Returns:

  • (RetryPolicy, nil)

    Retry policy for the activity. Note that the server may have set a different policy than the one provided when scheduling the activity. If the value is None, it means the server didn’t send information about retry policy (e.g. due to old server version), but it may still be defined server-side.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#schedule_to_close_timeoutFloat?

Returns Schedule to close timeout set by the caller.

Returns:

  • (Float, nil)

    Schedule to close timeout set by the caller.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#scheduled_timeTime

Returns When the activity was scheduled.

Returns:

  • (Time)

    When the activity was scheduled.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#start_to_close_timeoutFloat?

Returns Start to close timeout set by the caller.

Returns:

  • (Float, nil)

    Start to close timeout set by the caller.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#started_timeTime

Returns When the activity started.

Returns:

  • (Time)

    When the activity started.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#task_queueString

Returns Task queue this activity is on.

Returns:

  • (String)

    Task queue this activity is on.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#task_tokenString

Returns Task token uniquely identifying this activity. Note, this is a ‘ASCII-8BIT` encoded string, not a `UTF-8` encoded string nor a valid UTF-8 string.

Returns:

  • (String)

    Task token uniquely identifying this activity. Note, this is a ‘ASCII-8BIT` encoded string, not a `UTF-8` encoded string nor a valid UTF-8 string.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#workflow_idString

Returns Workflow ID that started this activity.

Returns:

  • (String)

    Workflow ID that started this activity.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#workflow_namespaceString

Returns Namespace this activity is on.

Returns:

  • (String)

    Namespace this activity is on.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#workflow_run_idString

Returns Workflow run ID that started this activity.

Returns:

  • (String)

    Workflow run ID that started this activity.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

#workflow_typeString

Returns Workflow type name that started this activity.

Returns:

  • (String)

    Workflow type name that started this activity.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/temporalio/activity/info.rb', line 77

class Info
  # Convert raw heartbeat details into Ruby types.
  #
  # Note, this live-converts every invocation.
  #
  # @param hints [Array<Object>, nil] Hints, if any, to assist conversion.
  # @return [Array<Object>] Converted details.
  def heartbeat_details(hints: nil)
    Internal::ProtoUtils.convert_from_payload_array(
      Context.current.payload_converter,
      raw_heartbeat_details.map(&:payload),
      hints:
    )
  end
end

Instance Method Details

#heartbeat_details(hints: nil) ⇒ Array<Object>

Convert raw heartbeat details into Ruby types.

Note, this live-converts every invocation.

Parameters:

  • hints (Array<Object>, nil) (defaults to: nil)

    Hints, if any, to assist conversion.

Returns:

  • (Array<Object>)

    Converted details.



84
85
86
87
88
89
90
# File 'lib/temporalio/activity/info.rb', line 84

def heartbeat_details(hints: nil)
  Internal::ProtoUtils.convert_from_payload_array(
    Context.current.payload_converter,
    raw_heartbeat_details.map(&:payload),
    hints:
  )
end