| Landing page | Verified | Failed to verify |
|:-------------:|:-------------:|:-----:|
| |
|
|
pipenv install --dev
(make sure to have pipenv
installed)..env.sample
to .env
and add: TELEGRAM_USERNAME
, TELEGRAM_TOKEN
, HCAPTCHA_SECRET
and HCAPTCHA_SITE_KEY
.HCAPTCHA_SECRET
& HCAPTCHA_SITE_KEY
HCAPTCHA_SECRET
: go the Settings tab.HCAPTCHA_SITE_KEY
: go to Sites tab and create a new site key.shell
cd app && FLASK_APP=wsgi.py FLASK_DEBUG=1 python3 -m flask run
```bash
docker-compose up
docker-compose down ```
Incase you need to run your the application on heroku:
heroku create <dev_instance_name> --remote development
APP_URL
with your dev instance linksecret token
and the bot username
: Creating a new bot - Telegram documentationsitekey
and the secret token
pipenv run python -m pytest
pipenv run coverage run --include="app/*" -m pytest
pipenv run coverage report -m
or as html: pipenv run coverage html && open htmlcov/index.html
python -m pytest app/tests/test_bot.py -k 'test_is_verified'
ipdb
breakpoint: python -m pytest -s app/tests/bot_handlers/test_handle_invitation.py
Simply merge all your changes to staging
branch, and it will be deployed to the staging heroku on successful builds and tests passing in github.
Merge all your changes to master
and it will be deployed to the prod environment.
Check the "Setup" section above and make sure that tests passes locally.
If using the herkou
cli approach, be sure to run this first:
heroku login
Make sure you've already remote tracking for your target env (one of):
git remote add <env> https://git.heroku.com/<app>.git
heroku git:remote -a staging-hcaptcha-telegram-bot
heroku git:remote -a prod-hcaptcha-telegram-bot
heroku
git remote rename heroku staging
Deploy code changes:
git push <env> your_dev_branch:master
(push specified branch)git push staging master:master
(push master from origin to staging remote master)Run DB migrations:
heroku run "python manage.py db upgrade -d app/migrations/" --remote <env>
If DB migration was needed you may need to manually start up the app:
heroku run web --remote <env>
(start up app inline)heroku ps:scale web=1 --remote <env>
(start up more instances of the app)hCaptchaBot
yellow_tg_bot
heroku logs --tail --remote <env>
Bumps certifi from 2020.12.5 to 2022.12.7.
9e9e840
2022.12.07b81bdb2
2022.09.24939a28f
2022.09.14aca828a
2022.06.15.2de0eae1
Only use importlib.resources's new files() / Traversable API on Python ≥3.11 ...b8eb5e9
2022.06.15.147fb7ab
Fix deprecation warning on Python 3.11 (#199)b0b48e0
fixes #198 -- update link in license9d514b4
2022.06.154151e88
Add py.typed to MANIFEST.in to package in sdist (#196)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps mako from 1.1.4 to 1.2.2.
Sourced from mako's releases.
1.2.2
Released: Mon Aug 29 2022
bug
[bug] [lexer] Fixed issue in lexer where the regexp used to match tags would not correctly interpret quoted sections individually. While this parsing issue still produced the same expected tag structure later on, the mis-handling of quoted sections was also subject to a regexp crash if a tag had a large number of quotes within its quoted sections.
References: #366
1.2.1
Released: Thu Jun 30 2022
bug
[bug] [tests] Various fixes to the test suite in the area of exception message rendering to accommodate for variability in Python versions as well as Pygments.
References: #360
misc
[performance] Optimized some codepaths within the lexer/Python code generation process, improving performance for generation of templates prior to their being cached. Pull request courtesy Takuto Ikuta.
References: #361
1.2.0
Released: Thu Mar 10 2022
changed
[changed] [py3k] Corrected "universal wheel" directive in
setup.cfg
so that building a wheel does not target Python 2.References: #351
[changed] [py3k] The
bytestring_passthrough
template argument is removed, as this flag only applied to Python 2.
... (truncated)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps ipython from 7.21.0 to 7.31.1.
e321e76
release 7.31.167ca2b3
Merge pull request from GHSA-pq7m-3gw7-gq5x2794330
back to devbe343e7
release 7.31.00fcf2c4
Merge pull request #13428 from meeseeksmachine/auto-backport-of-pr-13427-on-7.xb8db9b1
Backport PR #13427: wn 7317f253dc
Merge pull request #13412 from bnavigator/backport-inspect4f26796
fix xxlimited_35 import name77ca4a6
don't run nose-based iptest on py310, only pytest533e509
back to decorator skipDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Hello there When I want to deploy the bot I get error two instances are running at same movement please help me with it!
Few places where we leave open many connections to the db as indicated by:
$ heroku pg:ps --remote staging
pid | state | source | username | running_for | transaction_start | waiting | query
-------+---------------------+--------+----------------+-----------------+-------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
31479 | idle in transaction | | keoguvuxlyqnts | 00:18:13.381006 | 2020-10-29 22:47:14.225349+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:02:16.844205'::timestamp
31478 | idle in transaction | | keoguvuxlyqnts | 00:18:13.585231 | 2020-10-29 22:47:14.021124+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:02:16.677969'::timestamp
19092 | idle in transaction | | keoguvuxlyqnts | 05:22:02.090353 | 2020-10-29 17:43:25.516002+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:01:51.706861'::timestamp
26644 | idle in transaction | | keoguvuxlyqnts | 00:49:48.350257 | 2020-10-29 22:15:39.256098+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:00:42.551756'::timestamp
4304 | idle in transaction | | keoguvuxlyqnts | 03:08:25.218032 | 2020-10-29 19:57:02.388323+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:00:16.607548'::timestamp
31140 | idle in transaction | | keoguvuxlyqnts | 00:20:27.888331 | 2020-10-29 22:44:59.718024+00 | t | SELECT channels.id AS channels_id, channels.chat_id AS channels_chat_id, channels.restrict AS channels_restrict, channels.name AS channels_name +
| | | | | | | FROM channels +
| | | | | | | WHERE channels.chat_id = '1108918469'
At least say something like "we encountered an error processing this request" to indicate to look at the logs