Skip to content

Commit 36af3a9

Browse files
committed
Remove workflow_executor default and other minor change
1 parent e49257e commit 36af3a9

8 files changed

Lines changed: 8 additions & 15 deletions

File tree

activity_simple/worker.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
client:,
2424
task_queue: 'activity-simple-sample',
2525
activities: [select_from_db_activity, ActivitySimple::MyActivities::AppendSuffix],
26-
workflows: [ActivitySimple::MyWorkflow],
27-
workflow_executor: Temporalio::Worker::WorkflowExecutor::ThreadPool.default
26+
workflows: [ActivitySimple::MyWorkflow]
2827
)
2928

3029
# Run the worker until SIGINT

activity_worker/activity_worker.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
# By providing the class to the activity, it will be instantiated for every
1515
# attempt. If we provide an instance (e.g. SayHelloActivity.new), the same
1616
# instance is reused.
17-
activities: [ActivityWorker::SayHelloActivity],
18-
workflow_executor: Temporalio::Worker::WorkflowExecutor::ThreadPool.default
17+
activities: [ActivityWorker::SayHelloActivity]
1918
)
2019

2120
# Run the worker until SIGINT

context_propagation/worker.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
client:,
2222
task_queue: 'context-propagation-sample',
2323
activities: [ContextPropagation::SayHelloActivity],
24-
workflows: [ContextPropagation::SayHelloWorkflow],
25-
workflow_executor: Temporalio::Worker::WorkflowExecutor::ThreadPool.default
24+
workflows: [ContextPropagation::SayHelloWorkflow]
2625
)
2726

2827
# Run the worker until SIGINT

message_passing_simple/greeting_workflow.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def validate_set_language(new_language)
6565

6666
workflow_update
6767
def apply_language_with_lookup(new_language)
68-
# This update handler is async, so it can execute an activity.
68+
# Call an activity if it's not there.
6969
unless @greetings.include?(new_language.to_sym)
7070
# We use a mutex so that, if this handler is executed multiple times, each execution can schedule the activity
7171
# only when the previously scheduled activity has completed. This ensures that multiple calls to

message_passing_simple/worker.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
client:,
1515
task_queue: 'message-passing-simple-sample',
1616
activities: [MessagePassingSimple::CallGreetingService],
17-
workflows: [MessagePassingSimple::GreetingWorkflow],
18-
workflow_executor: Temporalio::Worker::WorkflowExecutor::ThreadPool.default
17+
workflows: [MessagePassingSimple::GreetingWorkflow]
1918
)
2019

2120
# Run the worker until SIGINT

test/activity_simple/my_workflow_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ def test_workflow
2525
client: env.client,
2626
task_queue: "tq-#{SecureRandom.uuid}",
2727
activities: [MockSelectFromDatabase, MyActivities::AppendSuffix],
28-
workflows: [MyWorkflow],
29-
workflow_executor: Temporalio::Worker::WorkflowExecutor::ThreadPool.default
28+
workflows: [MyWorkflow]
3029
)
3130
worker.run do
3231
# Run workflow

test/context_propagation/say_hello_workflow_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ def test_workflow
2222
client:,
2323
task_queue: "tq-#{SecureRandom.uuid}",
2424
activities: [SayHelloActivity],
25-
workflows: [SayHelloWorkflow],
26-
workflow_executor: Temporalio::Worker::WorkflowExecutor::ThreadPool.default
25+
workflows: [SayHelloWorkflow]
2726
)
2827
worker.run do
2928
# Start workflow with thread local, send signal, confirm result

test/message_passing_simple/greeting_workflow_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ def with_worker_running
1515
client: env.client,
1616
task_queue: "tq-#{SecureRandom.uuid}",
1717
activities: [CallGreetingService],
18-
workflows: [GreetingWorkflow],
19-
workflow_executor: Temporalio::Worker::WorkflowExecutor::ThreadPool.default
18+
workflows: [GreetingWorkflow]
2019
)
2120
worker.run { yield env.client, worker }
2221
end

0 commit comments

Comments
 (0)