From 7600cee4872bf5c0a7bee91c93df365d80be5f4c Mon Sep 17 00:00:00 2001 From: Drew Bednar Date: Sat, 10 Sep 2022 09:19:16 -0400 Subject: [PATCH] Add invoke tasks --- tasks.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tasks.py diff --git a/tasks.py b/tasks.py new file mode 100644 index 0000000..cfcf546 --- /dev/null +++ b/tasks.py @@ -0,0 +1,28 @@ +""" +A set of `invoke` helper commands used for this project. +""" +from invoke import task + +@task +def start_rabbit(c): + """Runs the RabbitMQ integration environment.""" + print("Starting RabbitMQ") + c.run("docker compose -f docker-compose-rabbit.yml up -d") + +@task +def stop_rabbit(c): + """Stops the RabbitMQ integration environent.""" + print("Stopping RabbitMQ") + c.run("docker compose -f docker-compose-rabbit.yml down") + +@task +def start_redis(c): + """Runs the Redis integration environment.""" + print("Starting Redis") + c.run("docker compose -f docker-compose-redis.yml up -d") + +@task +def stop_redis(c): + """Stops the Redis integration environent.""" + print("Stopping Redis") + c.run("docker compose -f docker-compose-redis.yml down") \ No newline at end of file