This repository contains the code for a discord bot which periodically generates usage statistics for plio and sends them to a discord channel.
-
Create a new file named
config.ini
by copying theconfig.example.ini
file and fill the respective values. The meaning of the sections and parameters can be found indocs/ENV.md
. -
Set up a virtual environment and install the dependencies
python -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Run the script
python lambda_function.py
To make this script run periodically, there are two options.
- Set up a cron job on an EC2 instance
- Set up an AWS Lambda function which is trigged to run periodically
Since we already had an EC2 instance for running other cron jobs and the fact that it is a bit painful to make pandas/numpy work with Lambda, we have currently gone ahead with option 1.