Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible to start the same bot more than once #26

Open
jmanian opened this issue Jul 21, 2016 · 2 comments
Open

possible to start the same bot more than once #26

jmanian opened this issue Jul 21, 2016 · 2 comments

Comments

@jmanian
Copy link

jmanian commented Jul 21, 2016

Maybe this is intentional or unavoidable, but I noticed that it's possible to start the same bot more than once.

For example:

  1. I restart Relax, so that it's running all my bots (exactly once each).
  2. I manually start a particular bot n times by calling Relax::Bot.start!(uid, token) from irb.
  3. I send a message to that bot.
  4. Sending message_new for this user and channel and sending event back to client each appear n + 1 times in the logs, followed immediately by ignoring, not sending event back to client n times.

It's not a problem, because it ignores all but 1 of the copies of the message, and puts only 1 event into redis. But I was surprised that it was possible to start the same bot more than once.

@arunthampi
Copy link
Owner

@jmanian thanks for reporting this. So the expected behavior is that it should stop the currently running bot and start it again rather than spin up multiple instances of the bot -- let me look into why this is happening.

@brianpgerson
Copy link

Was there any ever resolution with this? I see the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants