Skip to content

Adding capability to run in background and send messages.#89

Closed
cristianowa wants to merge 1 commit into
scrapinghub:developfrom
cristianowa:develop
Closed

Adding capability to run in background and send messages.#89
cristianowa wants to merge 1 commit into
scrapinghub:developfrom
cristianowa:develop

Conversation

@cristianowa
Copy link
Copy Markdown

With the intent to provide a better interface for doing things like the #42 I made a modification so, if needed, the bot can be executed in background and can be used to send messages still.
Based on that one can do the cron execute after it and just call bot.send_message().

For doing that I moved the loop from the dispatcher to to the bot and created a thread if it was running on background.

If used with default parameters, the behavior remains the same.

Refactoring loop to handle_events.
Running on background.
Adding lock and moving loop out of dispatcher.
@jtatum
Copy link
Copy Markdown
Contributor

jtatum commented Apr 8, 2017

This is a pretty major change to the behavior of the bot. In particular, it seems to remove the thread pool by default. Can you document some use cases? Might be nice to compare this approach to the one taken in #95. Is there any way to test this change?

@lins05
Copy link
Copy Markdown
Collaborator

lins05 commented May 28, 2017

ping @cristianowa

@cristianowa
Copy link
Copy Markdown
Author

Closing this since has been a while.

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

Successfully merging this pull request may close these issues.

3 participants