Skip to content

Commit e96d2f2

Browse files
committed
copyedit and bernd suggestion
Signed-off-by: Hannah Hunter <[email protected]>
1 parent 4b3438d commit e96d2f2

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

articles/azure-functions/durable/durable-task-scheduler/durable-task-scheduler-auto-purge.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Autopurge operates asynchronously in the background, optimized to minimize syste
1313

1414
## How it works
1515

16-
Autopurge is an opt-in feature. Enable it by defining retention policies that control how long to keep the data of orchestrations in certain statuses. The autopurge feature purges orchestration data associated only with the following statuses:
16+
Autopurge is an opt-in feature. You can enable it by defining retention policies that control how long to keep the data of orchestrations in certain statuses. The autopurge feature purges orchestration data associated only with the following statuses:
1717
- `Completed`
1818
- `Failed`
1919
- `Canceled`
@@ -30,7 +30,7 @@ Autopurge ignores orchestration data associated with the following statuses:
3030
3131
### Policy value
3232

33-
Retention value can range from 0 (purge up to 5 minutes after completion) to the maximum integer value, with the unit being **days**.
33+
Retention value can range from 0 (purge as soon as possible) to the maximum integer value, with the unit being **days**.
3434

3535
Although retention periods have no maximum limit, we recommend you avoid retaining large volumes of stale orchestration data for extended periods. This practice ensures efficient use of storage resources and maintains optimal app performance.
3636

@@ -56,11 +56,9 @@ When configuring an autopurge retention policy, you can set either a *specific*
5656
```
5757

5858
Add specific policies to override the default policy applied to orchestrations. In the following example, the second and third policies override the default policy (`"retentionPeriodInDays": 1`).
59-
- Data associated with `completed` orchestrations is deleted as soon as possible (approximately every 5 minutes).
59+
- Data associated with `completed` orchestrations is deleted as soon as possible.
6060
- Data associated with `failed` orchestrations is purged after 60 days.
6161

62-
However, since no specific policy is set for `canceled` or `terminated` orchestrations, the default policy still applies to them, purging their data after 1 day.
63-
6462
```json
6563
[
6664
{
@@ -77,6 +75,8 @@ However, since no specific policy is set for `canceled` or `terminated` orchestr
7775
]
7876
```
7977

78+
Since no specific policy is set for `canceled` or `terminated` orchestrations, the default policy still applies to them, purging their data after 1 day.
79+
8080
[For more information, see the API reference spec for Durable Task Scheduler retention policies.](/rest/api/durabletask/retention-policies/create-or-replace?view=rest-durabletask-2025-04-01-preview&preserve-view=true)
8181

8282
## Enable autopurge
@@ -89,19 +89,28 @@ You can define retention policies using:
8989

9090
# [Durable Task CLI](#tab/cli)
9191

92-
First, run `az extension update --name durabletask` to update the extension if you have it installed, or `az extension add --name durabletask` to install if you don't currently have the extension.
92+
Make sure you have the latest version of the Durable Task CLI extension.
93+
94+
```azurecli
95+
az extension add --name durabletask
96+
az extension update --name durabletask
97+
```
9398

9499
Create or update the retention policy by running the following command.
95100

96101
```azurecli
97102
az durabletask retention-policy create --scheduler-name SCHEDULER_NAME --resource-group RESOURCE_GROUP --default-days 1 --completed-days 0 --failed-days 60
98103
```
99-
The following are properties for specifying the retention duration for orchestration data of different statuses:
100-
- `--canceled-days` or `-x` : The number of days to retain canceled orchestrations.
101-
- `--completed-days` or `-c` : The number of days to retain completed orchestrations.
102-
- `--default-days` or `-d` : The number of days to retain orchestrations.
103-
- `--failed-days` or `-f` : The number of days to retain failed orchestrations.
104-
- `--terminated-days` or `-t` : The number of days to retain terminated orchestrations.
104+
105+
The following properties specify the retention duration for orchestration data of different statuses.
106+
107+
| Property | Description |
108+
| -------- | ----------- |
109+
| `--canceled-days` or `-x` | The number of days to retain canceled orchestrations. |
110+
| `--completed-days` or `-c` | The number of days to retain completed orchestrations. |
111+
| `--default-days` or `-d` | The number of days to retain orchestrations. |
112+
| `--failed-days` or `-f` | The number of days to retain failed orchestrations. |
113+
| `--terminated-days` or `-t` | The number of days to retain terminated orchestrations. |
105114

106115
**Example response**
107116

@@ -139,8 +148,8 @@ If creation is successful, you receive the following response.
139148
"type": "microsoft.durabletask/schedulers/retentionpolicies"
140149
}
141150
```
142-
> [!TIP]
143-
> Add `--help` to learn more about a Durable Task CLI command. For example, learn about the arguments and properties of the retention policy create command by running `az durabletask retention-policy create --help`
151+
152+
Learn more about the retention policy `create` command by running `az durabletask retention-policy create --help`.
144153

145154
# [Azure Resource Manager](#tab/arm)
146155

0 commit comments

Comments
 (0)