This directory contains a reference implementation of a bot. It's as simple as possible so you can take a look at how to implement new bot.
The directory might be eventually removed once we have some real bots implemented.
Parts:
- foobar/ - python package with bot implementation
- setup.py - setuptools script to install foobar package in image
- tasks.sh - celery worker start script
- producer.py - submits a task, this is for testing the bot
- ../Dockerfile.example - to create image with example bot
- ../docker-compose.yml - see
example-bot
service
To implement your bot, you need:
- a python module similar to
foobar/
andtasks.sh
script - run
make redis-start
to start redis - set $APP and $QUEUE (see
docker-compose.yaml
) and runtasks.sh
- run
python3 producer.py
- if you see
Task accepted
andTask xyz succeeded
proceed to next steps - create Dockerfile similar to
Dockerfile.example
- run your containerized bot similar to example-bot in
docker-compose.yaml