-
Notifications
You must be signed in to change notification settings - Fork 19
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
Telegram bot #27
Telegram bot #27
Conversation
Hi, Some time ago I was thinking about daemon process, which ought to handle UI (CLI, Web, GTK) commands, maybe this is the way to go. Yet daemon and API needs to be designed. Such approach opens various possible capabilities, including rich UI and bot endpoints. |
Hey folks, (Uponn execution, Yes, that is not real-time experience bots usually have, but IMHO this way we get consistent experience, similar to current torrt workflow (cron-scheduling). |
Hi, |
IMHO webhooks, in this case, is a redundant feature. The difference between adding torrent right away and with the delay of 1-2 min. is not that significant to complicate the existing solution. |
@NecroKote Deamon will be implemented someday if I had time %) |
@idlesign, if you'll have some time to describe your vision on 'daemonized' |
I thinking a lot about torrt daemon. Right now for me best solution is supervisor (http://supervisord.org/). Because:
May be we just write some README file now? |
# Conflicts: # docs/source/index.rst
@NecroKote Some thoughts in #28
Supervisord is a process control, but I'm talking about daemonization as in #28. Sure you would be able to use Supervisord or Upstart or Systemd, etc. %)
Sure, we've already settled that the issue won't depend on daemon to be merged. You can update README with bot usage examples, but I'd rather expect them to be in the documentaion. A step by step description of how to configure and use bot commands would be very nice. |
setup.py
Outdated
@@ -48,6 +48,9 @@ def get_version(): | |||
], | |||
setup_requires=[] + (['pytest-runner'] if 'test' in sys.argv else []) + [], | |||
|
|||
extras_require={ | |||
'telegram': ['python-telegram-bot'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to pin down the lowest version number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but more important was to pin highest version because maintainers are working on major release version 12 with lot of changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are they already guilty in backward incompatible releases? %)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw a lot of warnings in console for beta version so decide exclude 12 version for now.
torrt/notifiers/telegram.py
Outdated
LOGGER.info('Telegram message was sent to user %s' % self.chat_id) | ||
else: | ||
LOGGER.error('Telegram notification not send: %s' % r['description']) | ||
response = requests.post(url, data={'chat_id': self.chat_id, 'text': msg}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not introduce unrelated changes into the pull request, instead make several requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, sorry
Thank you. Merged. |
Hi.
Sometimes it is too lazy to open server console to add new torrent. So I decided to extend telegram bot capabilities. Now it is fully working and configurable but I have few open questions and hope you will help me.