Iā€™m migrating my flow code from prefect 0.15 to or...
# prefect-community
r
Iā€™m migrating my flow code from prefect 0.15 to orion
2.0.b2
. do you know where the
resource_manager
is located now? Before I was importing
from prefect import resource_manager
https://docs.prefect.io/core/idioms/resource-manager.html CC @Anna Geller @Kevin Kho
a
Great news: you just no longer need the resource manager! šŸ™‚ Instead, you can use any Python context manager to facilitate a cleanup process, such as restoring various kinds of a global state, locking and unlocking resources, closing opened files, etc. This page dives into details
in general, for migration-specific questions, check out this Discourse tag that has resources that may help you with migration
r
oh nice. thank you so much anna!
šŸ‘ 1
Thanks for the example. The example there, is still valid for creating an EMR/Spark cluster ? just a function with a try/finally block instead of a dedicated class?
a
Yup exactly!
šŸ‘Œ 1