Skip to content

Conversation

@pseusys
Copy link
Collaborator

@pseusys pseusys commented Mar 1, 2024

Description

Multiple user interface support added.

Checklist

  • I have performed a self-review of the changes

To Consider

  • Add tests (if functionality is changed)
  • Update API reference / tutorials / guides
  • Update CONTRIBUTING.md (if devel workflow is changed)
  • Update .ignore files, scripts (such as lint), distribution manifest (if files are added/deleted)
  • Search for references to changed entities in the codebase

@pseusys pseusys changed the title no message subscription prototype Multiple messenger interface support Mar 3, 2024
@RLKRo RLKRo added the enhancement New feature or request label Mar 5, 2024
Copy link
Member

@RLKRo RLKRo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

- value: List[Callable] - The list of called handlers for each stage. Defaults to an empty `dict`.
:param messenger_interface: An `AbsMessagingInterface` instance for this pipeline.
:param messenger_interfaces: An `AbsMessagingInterface` instance for this pipeline.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: fix docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also add tests for launching pipeline with multiple http interfaces and running them at the same time on different ports.

@pseusys
Copy link
Collaborator Author

pseusys commented Mar 12, 2024

Could you please remind me our final decision: do we pass interfaces as dict or as array only (with default or user-specified names)?

@RLKRo
Copy link
Member

RLKRo commented Mar 12, 2024

The latter.



# %%
telegram_interface = PollingTelegramInterface(token=os.environ["TG_BOT_TOKEN"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tutorial is currently broken due to calling infinity_polling in this interface.

#328 also uses self.application.run_polling to start the bot, so I'm assuming it would also cause issues.

See the tip:
https://docs.python-telegram-bot.org/en/v21.1.1/telegram.ext.application.html#telegram.ext.Application.run_polling

@RLKRo RLKRo mentioned this pull request Aug 2, 2024
5 tasks
@RLKRo RLKRo added this to the Release v1.0 milestone Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants