mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-06-07 10:50:51 +00:00
Statusinterval instead of Statusintervall
This commit is contained in:
parent
56da9e611f
commit
08ede998ba
18
lsyncd.lua
18
lsyncd.lua
|
@ -2360,7 +2360,7 @@ local StatusFile = (function()
|
||||||
log("Function", "write(", timestamp, ")")
|
log("Function", "write(", timestamp, ")")
|
||||||
|
|
||||||
-- some logic to not write too often
|
-- some logic to not write too often
|
||||||
if settings.statusIntervall > 0 then
|
if settings.statusInterval > 0 then
|
||||||
-- already waiting
|
-- already waiting
|
||||||
if alarm and timestamp < alarm then
|
if alarm and timestamp < alarm then
|
||||||
log("Statusfile", "waiting(",timestamp," < ",alarm,")")
|
log("Statusfile", "waiting(",timestamp," < ",alarm,")")
|
||||||
|
@ -2369,7 +2369,7 @@ local StatusFile = (function()
|
||||||
-- determines when a next write will be possible
|
-- determines when a next write will be possible
|
||||||
if not alarm then
|
if not alarm then
|
||||||
local nextWrite =
|
local nextWrite =
|
||||||
lastWritten and timestamp + settings.statusIntervall
|
lastWritten and timestamp + settings.statusInterval
|
||||||
if nextWrite and timestamp < nextWrite then
|
if nextWrite and timestamp < nextWrite then
|
||||||
log("Statusfile", "setting alarm: ", nextWrite)
|
log("Statusfile", "setting alarm: ", nextWrite)
|
||||||
alarm = nextWrite
|
alarm = nextWrite
|
||||||
|
@ -2775,10 +2775,18 @@ function runner.initialize()
|
||||||
if settings.pidfile then
|
if settings.pidfile then
|
||||||
lsyncd.configure("pidfile", settings.pidfile)
|
lsyncd.configure("pidfile", settings.pidfile)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- TODO: Remove after deprecation timespan.
|
||||||
|
if settings.statusIntervall ~= nil and settings.statusInterval == nil then
|
||||||
|
log("Warn",
|
||||||
|
"The setting 'statusIntervall' has been renamed to 'statusInterval'.")
|
||||||
|
settings.statusInterval = settings.statusIntervall
|
||||||
|
end
|
||||||
|
|
||||||
-----
|
-----
|
||||||
-- transfers some defaults to settings
|
-- transfers some defaults to settings
|
||||||
if settings.statusIntervall == nil then
|
if settings.statusInterval == nil then
|
||||||
settings.statusIntervall = default.statusIntervall
|
settings.statusInterval = default.statusInterval
|
||||||
end
|
end
|
||||||
|
|
||||||
-- makes sure the user gave Lsyncd anything to do
|
-- makes sure the user gave Lsyncd anything to do
|
||||||
|
@ -3670,7 +3678,7 @@ default = {
|
||||||
-----
|
-----
|
||||||
-- Minimum seconds between two writes of a status file.
|
-- Minimum seconds between two writes of a status file.
|
||||||
--
|
--
|
||||||
statusIntervall = 10,
|
statusInterval = 10,
|
||||||
}
|
}
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
Loading…
Reference in New Issue
Block a user