Skip to content

Commit 615c0bc

Browse files
authored
docs: Misc minor improvements (#964)
1 parent 8103c00 commit 615c0bc

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

packages/client/src/connection.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ export interface ConnectionOptions {
5454
channelArgs?: grpc.ChannelOptions;
5555

5656
/**
57-
* Grpc interceptors which will be applied to every RPC call performed by this connection. By default, an interceptor
58-
* will be included which automatically retries retryable errors. If you do not wish to perform automatic retries, set
59-
* this to an empty list (or a list with your own interceptors). If you want to add your own interceptors while
60-
* keeping the default retry behavior, add this to your list of interceptors:
61-
* `makeGrpcRetryInterceptor(defaultGrpcRetryOptions())`. See:
57+
* {@link https://grpc.github.io/grpc/node/module-src_client_interceptors.html | gRPC interceptors} which will be
58+
* applied to every RPC call performed by this connection. By default, an interceptor will be included which
59+
* automatically retries retryable errors. If you do not wish to perform automatic retries, set this to an empty list
60+
* (or a list with your own interceptors). If you want to add your own interceptors while keeping the default retry
61+
* behavior, add this to your list of interceptors: `makeGrpcRetryInterceptor(defaultGrpcRetryOptions())`. See:
6262
*
63-
* - @link makeGrpcRetryInterceptor
64-
* - @link defaultGrpcRetryOptions
63+
* - {@link makeGrpcRetryInterceptor}
64+
* - {@link defaultGrpcRetryOptions}
6565
*/
6666
interceptors?: grpc.Interceptor[];
6767

packages/common/src/activity-options.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,24 @@ export interface ActivityOptions {
4545
retry?: RetryPolicy;
4646

4747
/**
48-
* Maximum time of a single Activity execution attempt.
49-
Note that the Temporal Server doesn't detect Worker process failures directly. It relies on this timeout to detect that an Activity that didn't complete on time. So this timeout should be as short as the longest possible execution of the Activity body. Potentially long running Activities must specify {@link heartbeatTimeout} and call {@link activity.Context.heartbeat} periodically for timely failure detection.
50-
48+
* Maximum time of a single Activity execution attempt. Note that the Temporal Server doesn't detect Worker process
49+
* failures directly. It relies on this timeout to detect that an Activity that didn't complete on time. So this
50+
* timeout should be as short as the longest possible execution of the Activity body. Potentially long running
51+
* Activities must specify {@link heartbeatTimeout} and call {@link activity.Context.heartbeat} periodically for
52+
* timely failure detection.
53+
*
5154
* Either this option or {@link scheduleToCloseTimeout} is required.
55+
*
56+
* @default `scheduleToCloseTimeout` or unlimited
5257
* @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string}
5358
*/
5459
startToCloseTimeout?: string | number;
60+
5561
/**
5662
* Time that the Activity Task can stay in the Task Queue before it is picked up by a Worker. Do not specify this timeout unless using host specific Task Queues for Activity Tasks are being used for routing.
5763
* `scheduleToStartTimeout` is always non-retryable. Retrying after this timeout doesn't make sense as it would just put the Activity Task back into the same Task Queue.
58-
* @default unlimited
64+
*
65+
* @default `scheduleToCloseTimeout` or unlimited
5966
* @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string}
6067
*/
6168
scheduleToStartTimeout?: string | number;
@@ -64,7 +71,8 @@ Note that the Temporal Server doesn't detect Worker process failures directly. I
6471
* Total time that a workflow is willing to wait for Activity to complete.
6572
* `scheduleToCloseTimeout` limits the total time of an Activity's execution including retries (use {@link startToCloseTimeout} to limit the time of a single attempt).
6673
*
67-
* Either this option or {@link startToCloseTimeout} is required
74+
* Either this option or {@link startToCloseTimeout} is required.
75+
*
6876
* @default unlimited
6977
* @format number of milliseconds or {@link https://www.npmjs.com/package/ms | ms-formatted string}
7078
*/

packages/common/src/converter/failure-converter.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ export function cutoffStackTrace(stack?: string): string {
4343
}
4444

4545
/**
46-
* A `FailureConverter` is responsible to convert from proto `Failure` instances to JS `Errors` and back.
46+
* A `FailureConverter` is responsible for converting from proto `Failure` instances to JS `Errors` and back.
4747
*
48-
* It is recommended to use the {@link DefaultFailureConverter} and not attempt to customize the default implementation
49-
* in order to maintain cross language failure serialization compatibility.
48+
* We recommended using the {@link DefaultFailureConverter} instead of customizing the default implementation in order
49+
* to maintain cross-language Failure serialization compatibility.
5050
*
5151
* @experimental
5252
*/
@@ -81,11 +81,12 @@ export interface DefaultFailureConverterOptions {
8181
}
8282

8383
/**
84-
* Default cross language compatible failure converter.
84+
* Default, cross-language-compatible Failure converter.
8585
*
86-
* By default, it will leave error messages and stack traces as plain text. In order to encrypt those, set
87-
* `encodeCommonAttributes` to `true` in the constructor options and make sure to use a {@link PayloadCodec} that can
88-
* encrypt / decrypt payloads in your Worker and Client options.
86+
* By default, it will leave error messages and stack traces as plain text. In order to encrypt them, set
87+
* `encodeCommonAttributes` to `true` in the constructor options and use a {@link PayloadCodec} that can encrypt /
88+
* decrypt Payloads in your {@link WorkerOptions.dataConverter | Worker} and
89+
* {@link ClientOptions.dataConverter | Client options}.
8990
*
9091
* @experimental
9192
*/

0 commit comments

Comments
 (0)