Hello everyone . How can i use the on_deployment o...
# ask-for-help
j
Hello everyone . How can i use the on_deployment or on_startup decorators (like version 1.1) in the new release of bentoml 1.2 ? Thanks :) ref: https://docs.bentoml.com/en/v1.1.11/concepts/service.html#lifecycle-hooks
j
@Frost Ming would you mind giving a tip here!
f
These have not been implemented in 1.2, we will do it next, thanks
j
Okay, thanks for the answer guys
f
It’s worth mentioning that on_startup is trivial now, you can do stuff inside
__init__()
. So we don’t plan to add it back.
j
how about on_shutdown?
f
that should be added
👍 2
m
analogous to
__init__
, would overriding
__del__
work as intended?
🆙 1
f
It might work, but keep in mind
__del__
only runs when garbage collected
👍 1