Hi All, What a product! - Any tips on best pract...
# best-practices
Hi All, What a product! • Any tips on best practice for designing flows / sub-flows / tasks for batched web-requests in 2.0? Should tasks or sub-flows be the preferred function call for a batch? • Prefect is consuming a lot of RAM as it is fanning out to multiple web-request (i presume output / cache is stored for each request), is batching and then awaiting batches the best approach to avoid this? • Is there a way to view the parameters of a flow / task in the flow / task name in the UI? For example, for a task "collect" that performs a web request that collects id "x", it would be nice to see "collect-{id}-{task-id}" in the UI for the task run. Thanks!
👀 1
We're glad you like it! 1. Yes, at least we started compiling a list about when to use a flow vs. task here 2. You could check if adding caching on this task helps to mitigate the issue - if not, perhaps you could share a simple flow example we can use to reproduce the issue? 3. To set custom task run name, you could do
my_task.with_options(name="my new name")(arg, arg)
in your flow; But there’s more to the run name than the task name so it’s not 1:1 yet.