Skip to content

Commit

Permalink
just start one
Browse files Browse the repository at this point in the history
  • Loading branch information
bsoule committed Sep 8, 2022
1 parent b921dc4 commit c3ce4ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,17 @@ app.get('/', (req, resp) => {

app.listen(app.get('port'), () => {
console.log('Beebot app is listening on port', app.get('port'))
redis.keys("beebot.teamid.*", (err, obj) => {
redis.keys("beebot.teamid.T0HC65LRM", (err, obj) => {
//redis.keys("beebot.teamid.*", (err, obj) => {
console.log(`DEBUG1: obj (len=${obj.length}) = ${JSON.stringify(obj)}`)
for (var i = 0; i < obj.length; i++) {
var teamId = obj[i].split(".").pop()
console.log(`Doing beebot.startBot("${teamId}")`)
try {
beebot.startBot(teamId)
} catch (error) {
console.log("DEBUG LISTEN CATCH", error)
}
}
// I think that whole for loop can be replaced with this:
//obj.forEach(x => beebot.startBot(x.split(".").pop()))
Expand Down

0 comments on commit c3ce4ab

Please sign in to comment.