2
0

init.lua 432 B

1234567891011121314151617
  1. core.log("info", "Initializing Asynchronous environment")
  2. function core.job_processor(serialized_func, serialized_param)
  3. local func = loadstring(serialized_func)
  4. local param = core.deserialize(serialized_param)
  5. local retval = nil
  6. if type(func) == "function" then
  7. retval = core.serialize(func(param))
  8. else
  9. core.log("error", "ASYNC WORKER: Unable to deserialize function")
  10. end
  11. return retval or core.serialize(nil)
  12. end