mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Unify teardown function
This commit is contained in:
parent
2da2bdf7f6
commit
75cf795521
5 changed files with 19 additions and 30 deletions
|
|
@ -493,4 +493,19 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
-- @brief Teardown function, to be called at the end of the VM
|
||||
function user_scripts.teardown(available_modules, do_benchmark, do_print_benchmark)
|
||||
for _, check in pairs(available_modules.modules) do
|
||||
if check.teardown then
|
||||
check.teardown()
|
||||
end
|
||||
end
|
||||
|
||||
if do_benchmark then
|
||||
user_scripts.benchmark_dump(do_print_benchmark)
|
||||
end
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
return(user_scripts)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue