Skip to content

Commit

Permalink
Only create serial bots from the "discovery" service
Browse files Browse the repository at this point in the history
  • Loading branch information
hovanem committed Oct 31, 2017
1 parent ade5348 commit c22ad11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/middleware/bots/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ class Bots {
logger.error('Could not retreive connectionType', ex);
}
} else {
this.createBot(dbBot.dataValues);
// Let the discovery script create serial bots
const connectionType = this.app.context.bots.getBotPresets()[dbBot.model].info.connectionType;
if (connectionType !== 'serial') {
this.createBot(dbBot.dataValues);
}
}
} catch (ex) {
logger.error(`Failed to create bot. ${ex}`);
Expand Down

0 comments on commit c22ad11

Please sign in to comment.