Question: How to gracefully shutdown when using serve() without connect? #3718
Replies: 1 comment
|
Worth reframing this against how the execution model actually works, because it changes what "graceful shutdown" needs to mean here. Each step boundary is its own HTTP request/response between the Inngest orchestrator and your What SIGTERM handling on ECS actually needs to cover is more mundane:
So: I wouldn't expect (and haven't found) an |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I'm planning on running Inngest on ECS on a long-running service using Express. I wanted to understand how graceful shutdowns are supposed to work with the Inngest SDK.
As I understand it, each Inngest function invocation is an HTTP request, but multiple steps can run within a single HTTP request. If my service gets a SIGTERM, is it on me to check between each step to determine whether I need to exit the function + resume on a different machine?
I'm also curious how the
checkpointingoption affects this?Are there any examples I can follow on best practices here? I was hoping I could signal to the Inngest SDK directly to shut down, which would handle finishing any in-progress steps (and maybe supplying an 'AbortController' I can leverage within steps), and prevent starting any new steps.
Thanks in advance for your help.
All reactions