File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ local time = require 'bee.time'
1313local fw = require ' filewatch'
1414local furi = require ' file-uri'
1515
16+ --- @class service
1617local m = {}
1718m .type = ' service'
1819m .idleClock = 0.0
20+ m .sleeping = false
1921
2022local 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
195198end
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-
214200function 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'
You can’t perform that action at this time.
0 commit comments