Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/temporal/activity/context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def initialize(connection, metadata, config, heartbeat_thread_pool)
@last_heartbeat_throttled = false
end

attr_reader :heartbeat_check_scheduled, :cancel_requested, :last_heartbeat_throttled
attr_reader :metadata, :heartbeat_check_scheduled, :cancel_requested, :last_heartbeat_throttled

def async
@async = true
Expand Down Expand Up @@ -113,7 +113,7 @@ def name

private

attr_reader :connection, :metadata, :heartbeat_thread_pool, :config, :heartbeat_mutex, :last_heartbeat_details
attr_reader :connection, :heartbeat_thread_pool, :config, :heartbeat_mutex, :last_heartbeat_details

def task_token
metadata.task_token
Expand Down
6 changes: 6 additions & 0 deletions spec/unit/lib/temporal/activity/context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,10 @@
expect(subject.name).to eq('TestActivity')
end
end

describe '#metadata' do
it 'returns metadata' do
expect(subject.metadata).to eq(metadata)
end
end
end