Hi. This sounds like a noob question.
How do I change the default folder for results? (I don't mind, or actually want to, move the whole config folder)
I've tried adding
Copy code
home_dir = "/mnt/disks/prefect_data/.prefect"
to
.prefect/config.toml
, but results are still saved on my main disk
a
Anna Geller
11/23/2021, 9:34 AM
@Stéphan Taljaard which result class do you use, just LocalResult?
s
Stéphan Taljaard
11/23/2021, 9:34 AM
Yup, only LocalResult
a
Anna Geller
11/23/2021, 9:35 AM
You can specify dir as follows:
Copy code
from prefect import Flow, task
from prefect.engine.results import LocalResult
@task(result=LocalResult(dir='~/Desktop/HelloWorld/results'))
def my_task():
return 3
s
Stéphan Taljaard
11/23/2021, 9:36 AM
1. Can't I specify it globally so as to not have to manually edit every single task (I have quite a few)?
2. I also want to move the postgres db files off to another disk
(I want both the results and the db files on my
Regarding #2 you can set the database volume when starting the Server as follows - all configuration you can set on Server docker-compose file is available here (the intention is, you set everything through CLI rather than modifying the docker-compose file directly):
Copy code
prefect server config --volume-path /Users/stephan/some/path
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.