fix(updater): do not pin CPU at 100% while waiting for next run
This commit is contained in:
parent
276fdccf36
commit
19adda03d9
1 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,11 @@
|
||||||
local cjson = require('cjson')
|
local cjson = require('cjson')
|
||||||
local http = require('socket.http')
|
local http = require('socket.http')
|
||||||
local stdlib = require('posix.stdlib')
|
|
||||||
local redis = require('redis')
|
local redis = require('redis')
|
||||||
|
local socket = require('socket')
|
||||||
|
local stdlib = require('posix.stdlib')
|
||||||
|
|
||||||
|
-- TODO: Logging formatting
|
||||||
|
-- TODO: Monitoring
|
||||||
|
|
||||||
local client = redis.connect('redis', 6379)
|
local client = redis.connect('redis', 6379)
|
||||||
|
|
||||||
|
@ -85,4 +89,5 @@ while true do
|
||||||
end
|
end
|
||||||
last_update_time = current_time
|
last_update_time = current_time
|
||||||
end
|
end
|
||||||
|
socket.sleep(1)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue