33require 'temporal/connection/converter/payload/nil'
44require 'temporal/connection/converter/payload/bytes'
55require 'temporal/connection/converter/payload/json'
6- require 'temporal/connection/converter/payload/json_protobuf '
6+ require 'temporal/connection/converter/payload/proto_json '
77require 'temporal/connection/converter/composite'
88
99module Temporal
@@ -12,8 +12,7 @@ class Configuration
1212 Execution = Struct . new ( :namespace , :task_queue , :timeouts , :headers , :search_attributes , keyword_init : true )
1313
1414 attr_reader :timeouts , :error_handlers
15- attr_writer :converter
16- attr_accessor :connection_type , :host , :port , :credentials , :identity , :logger , :metrics_adapter , :namespace , :task_queue , :headers , :max_page_size , :connection_options , :search_attributes
15+ attr_accessor :connection_type , :converter , :host , :port , :credentials , :identity , :logger , :metrics_adapter , :namespace , :task_queue , :headers , :max_page_size , :connection_options , :search_attributes
1716
1817 # See https://docs.temporal.io/blog/activity-timeouts/ for general docs.
1918 # We want an infinite execution timeout for cron schedules and other perpetual workflows.
@@ -40,8 +39,8 @@ class Configuration
4039 payload_converters : [
4140 Temporal ::Connection ::Converter ::Payload ::Nil . new ,
4241 Temporal ::Connection ::Converter ::Payload ::Bytes . new ,
43- Temporal ::Connection ::Converter ::Payload ::JSON . new ,
44- Temporal ::Connection ::Converter ::Payload ::JSONProtobuf . new ,
42+ Temporal ::Connection ::Converter ::Payload ::ProtoJSON . new ,
43+ Temporal ::Connection ::Converter ::Payload ::JSON . new
4544 ]
4645 ) . freeze
4746
@@ -77,10 +76,6 @@ def timeouts=(new_timeouts)
7776 @timeouts = DEFAULT_TIMEOUTS . merge ( new_timeouts )
7877 end
7978
80- def converter
81- @converter
82- end
83-
8479 def for_connection
8580 Connection . new (
8681 type : connection_type ,
@@ -90,25 +85,27 @@ def for_connection
9085 identity : identity || default_identity ,
9186 options : {
9287 max_page_size : max_page_size
93- } . merge ( connection_options ) ,
88+ } . merge ( connection_options )
9489 ) . freeze
9590 end
9691
97- def default_identity
98- hostname = `hostname`
99- pid = Process . pid
100-
101- "#{ pid } @#{ hostname } "
102- end
103-
10492 def default_execution_options
10593 Execution . new (
10694 namespace : namespace ,
10795 task_queue : task_list ,
10896 timeouts : timeouts ,
10997 headers : headers ,
110- search_attributes : search_attributes ,
98+ search_attributes : search_attributes
11199 ) . freeze
112100 end
101+
102+ private
103+
104+ def default_identity
105+ hostname = `hostname`
106+ pid = Process . pid
107+
108+ "#{ pid } @#{ hostname } " . freeze
109+ end
113110 end
114111end
0 commit comments