Pretty simple
-
Clone the repo and
cdinto the directory. -
Start a vanilla redis server (or use one you already have). Docker Desktop is fine for a demo.
-
Make sure the port number needed in ☝️ is in
worker.py. -
(Mac only) Set the environment variable needed for process forking.
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES -
Start
worker.pyin the background. -
Start
app.pyby launching flask./usr/bin/env python3 -m flask run --host=0.0.0.0 --port=5000
-
If needed for external connectivity, launch
ngrokand map it to whatever you haveapp.pylistening on. -
Look at the logs of the Docker container once it's done to see a nice "Hello world" message customized to your username! 🎉
There are 2 systemd unit files in this directory. They launch worker.py and app.py in the background once redis is up. You should check the name of the redis service in app-queue.service to make sure it's correct to your distribution.