Skip to content
Merged
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
6 changes: 3 additions & 3 deletions activities-examples/src/activities/async-completion.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @@@SNIPSTART typescript-activity-complete-async
import { CompleteAsyncError, activityInfo } from '@temporalio/activity';
import { AsyncCompletionClient } from '@temporalio/client';
import { Client } from '@temporalio/client';

export async function doSomethingAsync(): Promise<string> {
const taskToken = activityInfo().taskToken;
Expand All @@ -10,8 +10,8 @@ export async function doSomethingAsync(): Promise<string> {

// this work could be done in a different process or on a different machine
async function doSomeWork(taskToken: Uint8Array): Promise<void> {
const client = new AsyncCompletionClient();
const client = new Client();
// does some work...
await client.complete(taskToken, "Job's done!");
await client.activity.complete(taskToken, "Job's done!");
}
// @@@SNIPEND