Skip to content

Commit 2f6cd61

Browse files
committed
filewatch update
1 parent a2075b5 commit 2f6cd61

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

script/service/service.lua

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ local time = require 'bee.time'
1313
local fw = require 'filewatch'
1414
local furi = require 'file-uri'
1515

16+
---@class service
1617
local m = {}
1718
m.type = 'service'
1819
m.idleClock = 0.0
20+
m.sleeping = false
1921

2022
local function countMemory()
2123
local mems = {}
@@ -145,6 +147,7 @@ function m.eventLoop()
145147
pub.task('timer', 1)
146148
pub.on('wakeup', function ()
147149
m.reportStatus()
150+
fw.update()
148151
end)
149152

150153
local function busy()
@@ -194,23 +197,6 @@ function m.eventLoop()
194197
end
195198
end
196199

197-
function m.pulse()
198-
--timer.loop(10, function ()
199-
-- if not m.workingClock and not m.sleeping and time.monotonic() - m.idleClock >= 300000 then
200-
-- m.sleeping = true
201-
-- files.flushCache()
202-
-- vm.flushCache()
203-
-- ws.flushCache()
204-
-- collectgarbage()
205-
-- collectgarbage()
206-
-- end
207-
-- m.reportStatus()
208-
--end)
209-
timer.loop(1, function ()
210-
fw.update()
211-
end)
212-
end
213-
214200
function m.reportStatus()
215201
local info = {}
216202
if m.workingClock and time.monotonic() - m.workingClock > 100 then
@@ -258,7 +244,6 @@ function m.start()
258244
pub.recruitBraves(4)
259245
proto.listen()
260246
m.report()
261-
m.pulse()
262247
m.testVersion()
263248

264249
require 'provider'

0 commit comments

Comments
 (0)