Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ Step executes at least once, may execute multiple times on failure/retry.
**TypeScript:**

```typescript
import { StepSemantics } from '@aws/durable-execution-sdk-js';

const result = await context.step(
'idempotent-operation',
async () => idempotentAPI(),
{ semantics: 'AT_LEAST_ONCE' }
{ semantics: StepSemantics.AtLeastOncePerRetry }
);
```

Expand All @@ -199,10 +201,12 @@ Step executes at most once, never retries. Use for non-idempotent operations.
**TypeScript:**

```typescript
import { StepSemantics } from '@aws/durable-execution-sdk-js';

const result = await context.step(
'charge-payment',
async () => chargeCard(amount),
{ semantics: 'AT_MOST_ONCE' }
{ semantics: StepSemantics.AtMostOncePerRetry }
);
```

Expand Down