Skip to content

Commit fd1cd2c

Browse files
committed
lint fixes
1 parent df09977 commit fd1cd2c

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

polling/infrequent/compose_greeting_activity.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'temporalio/activity'
4-
require_relative './test_service'
4+
require_relative 'test_service'
55

66
module InfrequentPolling
77
class ComposeGreetingActivity < Temporalio::Activity::Definition

polling/infrequent/greeting_workflow.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

33
require 'temporalio/workflow'
4-
require_relative './compose_greeting_activity'
5-
require_relative './test_service'
4+
require_relative 'compose_greeting_activity'
5+
require_relative 'test_service'
66

77
module InfrequentPolling
88
class GreetingWorkflow < Temporalio::Workflow::Definition

polling/infrequent/test_service.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ def get_service_result(input, activity_info)
1818

1919
puts "Attempt #{@attempts[workflow_id]} of #{ERROR_ATTEMPTS} to invoke service"
2020

21-
if @attempts[workflow_id] == ERROR_ATTEMPTS
22-
"#{input['greeting']}, #{input['name']}!"
23-
else
24-
raise TestServiceError, 'service is down'
25-
end
21+
raise TestServiceError, 'service is down' unless @attempts[workflow_id] == ERROR_ATTEMPTS
22+
23+
"#{input['greeting']}, #{input['name']}!"
2624
end
2725
module_function :get_service_result
2826
end

0 commit comments

Comments
 (0)