mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(server/cron): only print on task stop when debug is enabled
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user