Skip to content

Commit

Permalink
Docs update (aeebc96)
Browse files Browse the repository at this point in the history
  • Loading branch information
promptless[bot] authored Nov 19, 2024
1 parent d55af2e commit 46f1fd5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion docs/3.0/develop/results.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,23 @@ prefect config set PREFECT_RESULTS_PERSIST_BY_DEFAULT=true
See [settings](/3.0/manage/settings-and-profiles) for more information on how settings are managed.
</Tip>

<Tip>
**Control task result persistence separately**

You can control result persistence for tasks separately from flows using the `PREFECT_TASKS_DEFAULT_PERSIST_RESULT` setting:

```bash
prefect config set PREFECT_TASKS_DEFAULT_PERSIST_RESULT=true
```

Setting this to `true` will enable result persistence by default for all tasks, while setting it to `false` will disable it, overriding any parent flow settings.
</Tip>

## Configuring result persistence

There are four categories of configuration for result persistence:
- [whether to persist results at all](/3.0/develop/results#enabling-result-persistence): this is configured through
various keyword arguments and the `PREFECT_RESULTS_PERSIST_BY_DEFAULT` setting.
various keyword arguments and the `PREFECT_RESULTS_PERSIST_BY_DEFAULT` setting. Additionally, task-specific persistence can be controlled using the `PREFECT_TASKS_DEFAULT_PERSIST_RESULT` setting.
- [what filesystem to persist results to](/3.0/develop/results#result-storage): this is configured through the `result_storage`
keyword and the `PREFECT_DEFAULT_RESULT_STORAGE_BLOCK` setting.
- [how to serialize and deserialize results](/3.0/develop/results#result-serialization): this is configured through
Expand Down Expand Up @@ -76,6 +88,7 @@ Any settings _explicitly_ set on a task take precedence over the flow settings.

</Note>

Additionally, you can control task result persistence globally using the `PREFECT_TASKS_DEFAULT_PERSIST_RESULT` environment variable. If set to `True`, results will be persisted by default for all tasks. Setting it to `False` will disable persistence by default, overriding the behavior set by a parent flow or task.
### Result storage

You can configure the system of record for your results through the `result_storage` keyword argument.
Expand Down
4 changes: 2 additions & 2 deletions docs/3.0/develop/task-caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ This behavior can be configured - see [customizing the cache](/3.0/develop/write
**Caching requires result persistence**

Caching requires result persistence, which is off by default.
To turn on result persistence for all of your tasks use the `PREFECT_RESULTS_PERSIST_BY_DEFAULT` setting:
To turn on result persistence for all of your tasks use the `PREFECT_TASKS_DEFAULT_PERSIST_RESULT` setting:

```
prefect config set PREFECT_RESULTS_PERSIST_BY_DEFAULT=true
prefect config set PREFECT_TASKS_DEFAULT_PERSIST_RESULT=true
```

See [managing results](/3.0/develop/results/) for more details on managing your result configuration, and
Expand Down

0 comments on commit 46f1fd5

Please sign in to comment.