Skip to content

Commit 9f88794

Browse files
authored
Apply time unit in cancellable scope (#279)
1 parent 8191168 commit 9f88794

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

temporal-sdk/src/main/java/io/temporal/internal/sync/CompletablePromiseImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public V cancellableGetImpl(boolean cancellable, long timeout, TimeUnit unit)
111111
throws TimeoutException {
112112
if (!completed) {
113113
WorkflowInternal.await(
114-
Duration.ofMillis(timeout),
114+
Duration.ofMillis(unit.toMillis(timeout)),
115115
"Feature.get",
116116
() -> {
117117
if (cancellable) {

temporal-sdk/src/main/java/io/temporal/worker/WorkerOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ public Builder setActivityPollThreadCount(int activityPollThreadCount) {
178178
}
179179

180180
/**
181-
* If set to true worker would only handle workflow tasks and local activities.
182-
* Non-local activities will not be executed by this worker.
181+
* If set to true worker would only handle workflow tasks and local activities. Non-local
182+
* activities will not be executed by this worker.
183183
*
184184
* <p>Default is false.
185185
*/

0 commit comments

Comments
 (0)