Skip to content

possible to start the same bot more than once #26

@jmanian

Description

@jmanian

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions