Top.Mail.Ru
box.ctl.on_schema_init() | Tarantool
 

box.ctl.on_schema_init()

box.ctl.on_schema_init()

The box.ctl submodule also contains two functions for the two server trigger definitions: on_shutdown and on_schema_init. Please, familiarize yourself with the mechanism of trigger functions before using them.

box.ctl.on_shutdown(trigger-function[, old-trigger-function])

Create a “shutdown trigger”. The trigger-function will be executed whenever os.exit() happens, or when the server is shut down after receiving a SIGTERM or SIGINT or SIGHUP signal (but not after SIGSEGV or SIGABORT or any signal that causes immediate program termination).

Parameters:
  • trigger-function (function) – function which will become the trigger function
  • old-trigger-function (function) – existing trigger function which will be replaced by trigger-function
Return:

nil or function pointer

If the parameters are (nil, old-trigger-function), then the old trigger is deleted.

Details about trigger characteristics are in the triggers section.