mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-08 09:18:30 +00:00
fixing alarms
This commit is contained in:
parent
b5fb18cda5
commit
903649d3aa
@ -35,7 +35,6 @@ end
|
|||||||
-- Called when socket can be read
|
-- Called when socket can be read
|
||||||
local function ircReady(socket)
|
local function ircReady(socket)
|
||||||
local l, err, ircRBuf = ircSocket:receive("*l", ircRBuf)
|
local l, err, ircRBuf = ircSocket:receive("*l", ircRBuf)
|
||||||
log("Normal", "XXX", l)
|
|
||||||
if not l then
|
if not l then
|
||||||
if errr ~= "timeout" then
|
if errr ~= "timeout" then
|
||||||
log("Error", "IRC connection failed: ", err)
|
log("Error", "IRC connection failed: ", err)
|
||||||
@ -98,10 +97,10 @@ local function action(inlet)
|
|||||||
local event, event2 = inlet.getEvent()
|
local event, event2 = inlet.getEvent()
|
||||||
if not event2 then
|
if not event2 then
|
||||||
writeIrc("PRIVMSG ",chan," :",event.etype," ",
|
writeIrc("PRIVMSG ",chan," :",event.etype," ",
|
||||||
event.path)
|
event.path, "\n")
|
||||||
else
|
else
|
||||||
writeIrc("PRIVMSG ",chan," :",event.etype," ",
|
writeIrc("PRIVMSG ",chan," :",event.etype," ",
|
||||||
event.path," -> ",event2.path)
|
event.path," -> ",event2.path, "\n")
|
||||||
end
|
end
|
||||||
inlet.discardEvent(event)
|
inlet.discardEvent(event)
|
||||||
end
|
end
|
||||||
@ -110,3 +109,7 @@ end
|
|||||||
|
|
||||||
sync{source= "src", action= action, delay= 1 }
|
sync{source= "src", action= action, delay= 1 }
|
||||||
|
|
||||||
|
|
||||||
|
for k, v in pairs(_G) do
|
||||||
|
print(k, v)
|
||||||
|
end
|
||||||
|
@ -1241,7 +1241,7 @@ local Sync = (function()
|
|||||||
-- finds the nearest delay waiting to be spawned
|
-- finds the nearest delay waiting to be spawned
|
||||||
for _, d in ipairs(self.delays) do
|
for _, d in ipairs(self.delays) do
|
||||||
if d.status == "wait" then
|
if d.status == "wait" then
|
||||||
return alarm
|
return d.alarm
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -2616,7 +2616,6 @@ end
|
|||||||
--
|
--
|
||||||
function runner.getAlarm()
|
function runner.getAlarm()
|
||||||
local alarm = false
|
local alarm = false
|
||||||
|
|
||||||
----
|
----
|
||||||
-- checks if current nearest alarm or a is earlier
|
-- checks if current nearest alarm or a is earlier
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user