blob: 929ddd8bc4fbcbd18b3a1e871777ccee127e1c72 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
mesecons_debug.dump_queue = function()
minetest.log("warning", "[dump_queue] dumping mesecons action-queue")
local fname = minetest.get_worldpath().."/mesecons_dump_" .. os.date("%Y%m%dT%H%M%S") .. ".json"
local f = io.open(fname, "w")
local data_string, err = minetest.write_json(mesecon.queue.actions)
if err then
error(err)
end
f:write(data_string)
io.close(f)
minetest.log("action", "[dump_queue] dumped " .. #mesecon.queue.actions ..
" actions to " .. fname ..
" bytes: " .. string.len(data_string)
)
end
|