4 files changed
+15
-1
No files matched your search
@@ -36,6 +36,7 @@ const resolve = async (parent, { bot }, context) => {
|
||||
products: [auxProduct]
|
||||
}
|
||||
auxTeam.bots.push(newBotClone)
|
||||
userEcosystem.markModified("devTeams")
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,17 @@ const resolve = async (parent, { team }, context) => {
|
||||
|
||||
// Teams will be created on a local minio container
|
||||
let botsConfigurations = []
|
||||
await createContainer(team.codeName)
|
||||
try {
|
||||
await createContainer(team.codeName)
|
||||
} catch (err) {
|
||||
if (err.message !== 'Your previous request to create the named bucket succeeded and you already own it.') {
|
||||
logger.error('addTeam -> Error: %s', err.stack)
|
||||
throw err
|
||||
} else {
|
||||
logger.warn('addTeam -> %s', err.message)
|
||||
}
|
||||
}
|
||||
|
||||
let tradingBot = await copyBot(team.codeName, team.bot.codeName, team.bot.displayName, writeFileContent)
|
||||
botsConfigurations.push(tradingBot)
|
||||
let simulatorBot = await copySimulator(team.codeName, team.bot.codeName, team.bot.displayName, writeFileContent)
|
||||
@@ -59,6 +69,7 @@ const resolve = async (parent, { team }, context) => {
|
||||
}
|
||||
|
||||
userEcosystem.devTeams.push(team)
|
||||
userEcosystem.markModified("devTeams")
|
||||
await userEcosystem.save()
|
||||
return team
|
||||
} catch (err) {
|
||||
|
||||
@@ -32,6 +32,7 @@ const resolve = async (parent, { team }, context) => {
|
||||
teamFound = true
|
||||
await deleteContainer(team.codeName)
|
||||
userEcosystem.devTeams.splice(i, 1)
|
||||
userEcosystem.markModified("devTeams")
|
||||
await userEcosystem.save()
|
||||
break
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ const resolve = async (parent, { bot }, context) => {
|
||||
if (auxProduct.codeName === bot.productCodeName) {
|
||||
removedBotClone = auxBot
|
||||
auxTeam.bots.splice(j, 1)
|
||||
userEcosystem.markModified("devTeams")
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user