diff options
author | Matthew Wild <mwild1@gmail.com> | 2023-04-01 11:59:50 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2023-04-01 11:59:50 +0100 |
commit | 05c67040757bd1c8861caa03755609a42b504ecf (patch) | |
tree | 363a51843e2879e1948b3486125e23773c5b8922 /util/dbuffer.lua | |
parent | 5ce1fe2603abf0e49b396a34bfb3b11a9ccd2e27 (diff) | |
download | prosody-05c67040757bd1c8861caa03755609a42b504ecf.tar.gz prosody-05c67040757bd1c8861caa03755609a42b504ecf.zip |
moduleapi: Add module:once() to execute a function after module load/startup
It is a common pattern for modules to do something like check for
prosody.start_time, and execute code immediately if it is present, or wait for
the server-started event if it isn't yet. For example, this allows you to run
code after all other modules/hosts have been loaded, that are going to be
loaded.
Such code can now be replaced with a simple call to this method.
Diffstat (limited to 'util/dbuffer.lua')
0 files changed, 0 insertions, 0 deletions