You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/durable/durable-task-scheduler/durable-task-scheduler-auto-purge.md
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Autopurge operates asynchronously in the background, optimized to minimize syste
13
13
14
14
## How it works
15
15
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:
17
17
-`Completed`
18
18
-`Failed`
19
19
-`Canceled`
@@ -30,7 +30,7 @@ Autopurge ignores orchestration data associated with the following statuses:
30
30
31
31
### Policy value
32
32
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**.
34
34
35
35
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.
36
36
@@ -56,11 +56,9 @@ When configuring an autopurge retention policy, you can set either a *specific*
56
56
```
57
57
58
58
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.
60
60
- Data associated with `failed` orchestrations is purged after 60 days.
61
61
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
-
64
62
```json
65
63
[
66
64
{
@@ -77,6 +75,8 @@ However, since no specific policy is set for `canceled` or `terminated` orchestr
77
75
]
78
76
```
79
77
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
+
80
80
[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)
81
81
82
82
## Enable autopurge
@@ -89,19 +89,28 @@ You can define retention policies using:
89
89
90
90
# [Durable Task CLI](#tab/cli)
91
91
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
+
```
93
98
94
99
Create or update the retention policy by running the following command.
> 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`.
0 commit comments