Merge pull request #48 from AAVikings/master
Individual execution parameters
This commit is contained in:
3 files changed
+12
-11
No files matched your search
@@ -89,8 +89,13 @@ const createClone = async (clone) => {
|
||||
})
|
||||
|
||||
env.push({
|
||||
'name': 'EXECUTION_PARAMETERS',
|
||||
'value': buildExecutionParameters(clone)
|
||||
'name': 'TIME_PERIOD',
|
||||
'value': clone.timePeriod
|
||||
})
|
||||
|
||||
env.push({
|
||||
'name': 'DATA_SET',
|
||||
'value': datasetNames().get(clone.timePeriod)
|
||||
})
|
||||
|
||||
if (clone.mode === BACKTEST) {
|
||||
@@ -147,6 +152,7 @@ const createClone = async (clone) => {
|
||||
}
|
||||
|
||||
deploymentManifest.spec.template.spec.containers[0].env = env
|
||||
logger.debug('createClone env: %s', JSON.stringify(env))
|
||||
|
||||
await client.apis.batch.v1.namespaces('default').jobs.post(
|
||||
{ body: deploymentManifest })
|
||||
@@ -157,13 +163,6 @@ const createClone = async (clone) => {
|
||||
}
|
||||
}
|
||||
|
||||
function buildExecutionParameters(clone){
|
||||
let executionParameters = {}
|
||||
executionParameters.timePeriod = clone.timePeriod
|
||||
executionParameters.dataSet = datasetNames().get(clone.timePeriod)
|
||||
return JSON.stringify(executionParameters)
|
||||
}
|
||||
|
||||
function datasetNames(){
|
||||
let dataSetMap = new Map()
|
||||
dataSetMap.set("24-hs","Multi-Period-Market")
|
||||
|
||||
@@ -33,7 +33,8 @@ const getClonePodLogs = async (cloneName) => {
|
||||
return "Logs not available."
|
||||
}
|
||||
} catch (err) {
|
||||
throw new KubernateError(err)
|
||||
logger.error('There was an error getting the pod logs %s: ', err)
|
||||
return "Logs not available."
|
||||
}
|
||||
}
|
||||
export default getClonePodLogs
|
||||
@@ -30,7 +30,8 @@ const getClonePodStatus = async (cloneName) => {
|
||||
return " Clone not found on the server. "
|
||||
}
|
||||
} catch (err) {
|
||||
throw new KubernateError(err)
|
||||
logger.error('There was an error getting the pod status %s: ', err)
|
||||
return "Status not available."
|
||||
}
|
||||
}
|
||||
export default getClonePodStatus
|
||||
Reference in new issue
Block a user