fix(server/cron): only print on task stop when debug is enabled

This commit is contained in:
Linden
2023-04-21 01:46:27 +10:00
parent 125f6e1a56
commit 28aaa9c5d9

View File

@@ -15,6 +15,7 @@ currentDate.sec = 0
---@field debug? boolean ---@field debug? boolean
---@class OxTask : OxTaskProperties ---@class OxTask : OxTaskProperties
---@field private scheduleTask fun(self: OxTask)
local OxTask = {} local OxTask = {}
OxTask.__index = OxTask OxTask.__index = OxTask
@@ -173,7 +174,10 @@ function OxTask:run()
end end
function OxTask:stop() function OxTask:stop()
print(('stopping task %s'):format(self.id)) if self.debug then
print(('stopping task %s'):format(self.id))
end
self.isActive = false self.isActive = false
end end