The shutdown hook will be called when the server shuts down. Your code
will have a short amount of time to save state and exit. The shutdown
hook should interrupt any long running code you have, e.g. by calling
apiproxy_stub_map.apiproxy.CancelApiCalls and/or raising an exception.
Args
hook
A no-argument callable which will be called when the server is
shutting down.
Returns
The previously registered shutdown hook, or None if no hook was
registered before.
In some cases it may not be possible to run the shutdown hook
before the server exits.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[],[]]