Hello,
On 06.07.17 10:51, Sebastian Damm wrote:
Hi,
On Thu, Jul 6, 2017 at 10:16 AM, Daniel-Constantin Mierla
<miconda(a)gmail.com> wrote:
it sounds like you want to re-initialize the Lua
interpreter, not to
reload the Lua script. If you want a fully fresh Lua interpreter, then
at this moment you have to restart kamailio.
Does the script get some kind of
notification that a reload took place?
Is there any variable or something that I can use inside the script to
check whether it was just reloaded? It's really just an
initialisation. My script has to fetch some database entries once to
work. So if I could react on a signal or other kind of notification,
this could help, too.
You can check a shared memory variable (like $sht(...) or $shv(...))
that you can change via rpc, so you can re-fetch the database records
even if you don't change the lua script.
Having an indication on script reload inside the script itself could be
useful, but requires some c coding at this moment, not being implemented.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training -
www.asipto.com
Kamailio World Conference -
www.kamailioworld.com