]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_core/commitdiff
nwfmqtt: remove deprecated heartbeat function
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 12 Aug 2018 13:58:23 +0000 (14:58 +0100)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sun, 12 Aug 2018 13:58:23 +0000 (14:58 +0100)
This also drops another use of tq from the tree

net/nwfmqtt.lua

index 7e67859cfa359066089e734f2a976a9e46a0fb33..086652fcfbe8a4bddfbcb8c1342536fb701274dd 100644 (file)
@@ -36,14 +36,6 @@ function self.connect(m,cf) -- make a connection with parameters from json file
   secure = (secure == 1) or 0
   return m:connect(broker,port,secure,0)
 end
--- XXX deprecated in favor of new upstream cron module
-function self.heartbeat(m,topic,tq,period) -- set up lw&t and periodically heartbeat using tq until cancelled
-  m:lwt(topic,"dead",1,1)
-  local handle
-  local function beat() m:publish(topic,"beat",1,1); handle = tq:queue(period, beat) end
-  handle = tq:queue(period,beat)
-  return function() tq:dequeue(handle) end
-end
 function self.suball(m,fn) -- subscribe to all lines in a file
   if file.open(fn) then
     local line