mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-05 16:12:32 +00:00
fixing alarms
This commit is contained in:
parent
b5fb18cda5
commit
903649d3aa
@ -23,7 +23,7 @@ ircSocket:settimeout(0)
|
||||
-- Buffer for stuff to send and receive on IRC:
|
||||
local ircWBuf = ""
|
||||
local ircRBuf = ""
|
||||
local writeIrc
|
||||
local writeIrc
|
||||
|
||||
-----
|
||||
-- Called when the IRC socket can be written
|
||||
@ -35,7 +35,6 @@ end
|
||||
-- Called when socket can be read
|
||||
local function ircReady(socket)
|
||||
local l, err, ircRBuf = ircSocket:receive("*l", ircRBuf)
|
||||
log("Normal", "XXX", l)
|
||||
if not l then
|
||||
if errr ~= "timeout" then
|
||||
log("Error", "IRC connection failed: ", err)
|
||||
@ -98,10 +97,10 @@ local function action(inlet)
|
||||
local event, event2 = inlet.getEvent()
|
||||
if not event2 then
|
||||
writeIrc("PRIVMSG ",chan," :",event.etype," ",
|
||||
event.path)
|
||||
event.path, "\n")
|
||||
else
|
||||
writeIrc("PRIVMSG ",chan," :",event.etype," ",
|
||||
event.path," -> ",event2.path)
|
||||
event.path," -> ",event2.path, "\n")
|
||||
end
|
||||
inlet.discardEvent(event)
|
||||
end
|
||||
@ -110,3 +109,7 @@ end
|
||||
|
||||
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
|
||||
for _, d in ipairs(self.delays) do
|
||||
if d.status == "wait" then
|
||||
return alarm
|
||||
return d.alarm
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -2616,7 +2616,6 @@ end
|
||||
--
|
||||
function runner.getAlarm()
|
||||
local alarm = false
|
||||
|
||||
----
|
||||
-- checks if current nearest alarm or a is earlier
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user