Move PluginShare.backgroundJobs into PluginShare module (#3128)

This commit is contained in:
Hzj_jie
2017-08-24 00:10:57 -07:00
committed by Frans de Jonge
parent 0dcdb2888f
commit b89435b432
3 changed files with 3 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
-- PluginShare is a table for plugins to exchange data between each other. Plugins should maintain
-- their own protocols.
return {}
return {
backgroundJobs = {},
}

View File

@@ -22,8 +22,6 @@ local AutoFrontlight = {
last_brightness = -1,
}
PluginShare.backgroundJobs = PluginShare.backgroundJobs or {}
function AutoFrontlight:_schedule(settings_id)
local enabled = function()
if not self.enabled then

View File

@@ -64,8 +64,6 @@ local logger = require("logger")
-- end_sec: number, the os.time() when the job was stopped.
-- insert_sec: number, the os.time() when the job was inserted into queue.
PluginShare.backgroundJobs = PluginShare.backgroundJobs or {}
local BackgroundRunner = {
jobs = PluginShare.backgroundJobs,
}