fix(inferium)!: rename getconfig in get-config
This commit is contained in:
parent
49669c6e59
commit
b88bc8a023
@ -2,7 +2,7 @@ local net = require('libs/net')
|
|||||||
local utils = require('libs/utils')
|
local utils = require('libs/utils')
|
||||||
local turtleUtils = require('libs/turtle-utils')
|
local turtleUtils = require('libs/turtle-utils')
|
||||||
|
|
||||||
local VERSION = "3.1.0"
|
local VERSION = "4.0.0"
|
||||||
local INFERIUM_SERVER = 'inferium.com'
|
local INFERIUM_SERVER = 'inferium.com'
|
||||||
local IDLE_TIME = 2
|
local IDLE_TIME = 2
|
||||||
local WAIT_ITEM_IDLE_TIME = 5
|
local WAIT_ITEM_IDLE_TIME = 5
|
||||||
@ -321,7 +321,7 @@ end
|
|||||||
|
|
||||||
local function fetchRemoteConfig()
|
local function fetchRemoteConfig()
|
||||||
print('> fetch remote config')
|
print('> fetch remote config')
|
||||||
local message = { type = 'getconfig' }
|
local message = { type = 'get-config' }
|
||||||
|
|
||||||
local lastErrMessage = nil
|
local lastErrMessage = nil
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ local utils = require('libs/utils')
|
|||||||
local inferium = require('config/inferium')
|
local inferium = require('config/inferium')
|
||||||
|
|
||||||
local DEFAULT_HARVESTER_NAME = 'harvester'
|
local DEFAULT_HARVESTER_NAME = 'harvester'
|
||||||
local VERSION = "1.2.0"
|
local VERSION = "2.0.0"
|
||||||
local INFERIUM_SERVER = 'inferium.com'
|
local INFERIUM_SERVER = 'inferium.com'
|
||||||
|
|
||||||
local PERSISTED_CONFIGS = '/data/inferium-configs'
|
local PERSISTED_CONFIGS = '/data/inferium-configs'
|
||||||
@ -78,7 +78,7 @@ end
|
|||||||
|
|
||||||
local function getConfig(_, computerId)
|
local function getConfig(_, computerId)
|
||||||
if not computerId == nil then
|
if not computerId == nil then
|
||||||
print('getconfig error: no computerId found')
|
print('get-config error: no computerId found')
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ local function getConfig(_, computerId)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type = "getconfig/response",
|
type = "get-config/response",
|
||||||
payload = getConfigWithLength(config)
|
payload = getConfigWithLength(config)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -133,8 +133,8 @@ local function upgradeServer()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local ROUTES = {
|
local ROUTES = {
|
||||||
['getconfig'] = getConfig,
|
['get-config'] = getConfig,
|
||||||
['setconfig'] = setConfig,
|
['set-config'] = setConfig,
|
||||||
['list-harvesters'] = listHarvesters,
|
['list-harvesters'] = listHarvesters,
|
||||||
['exit-server'] = exitServer,
|
['exit-server'] = exitServer,
|
||||||
['upgrade-server'] = upgradeServer,
|
['upgrade-server'] = upgradeServer,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user