Compare commits
No commits in common. "cb451f02afa33951563bad2f584c5f215b4a92fc" and "c65a9e472bc1c3721d796dc5b4eb8fa590290bf6" have entirely different histories.
cb451f02af
...
c65a9e472b
2 changed files with 3 additions and 15 deletions
14
README.md
14
README.md
|
@ -6,22 +6,10 @@ The bot calls the Api and sends the invitation link via e-mail to a given receip
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Use container image or run this after cloning. In both cases you need to create a `.env` file containing the matrix and mail server credentials:
|
Use container image or run this after cloning:
|
||||||
|
|
||||||
```
|
|
||||||
cp. .env.example .env
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to run it without the container you can run it like this:
|
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
. bin/activate
|
. bin/activate
|
||||||
python -m matrix_bot_invitation_mailer
|
python -m matrix_bot_invitation_mailer
|
||||||
```
|
```
|
||||||
|
|
||||||
And for use with docker run it like this:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker compose up -d
|
|
||||||
```
|
|
||||||
|
|
|
@ -117,9 +117,9 @@ The link will be valid for 7 days.""".format(os.getenv("REGISTRATION_URL") + res
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
bot.run()
|
bot.run()
|
||||||
except (ServerDisconnectedError, ValueError):
|
except ServerDisconnectedError:
|
||||||
logging.info("connection lost, reconnecting in 5 seconds...")
|
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
logging.info("connection lost, reconnecting in 5 seconds...")
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logging.info("exiting...")
|
logging.info("exiting...")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Reference in a new issue