This directory contains the Python source and Docker file for Tracker's result queue, a Flask app that runs on a Gunicorn server and is deployed as a Knative service.
The result queue receives result processing requests from Tracker's scanners and enqueues them in one of three Redis queues depending on the scanner requesting result processing. Workers then asynchronously dispatch requests to the result processor service. The docker-entrypoint.sh script is responsible for starting the Redis server and RQ workers prior to launching the Flask app and its Gunicorn server, as they must be running in the background for the queue to function.
The manifest defining the Knative service can be found here.
To install dependencies, you can use pip or pipenv. Pipenv is recommended for development.
To install with pip:
pip3 install -r requirements.txtWith pipenv:
pipenv install
Pipenv will pick up requirements.txt automatically so long as it doesn't find a pipfile.
The queue expects to find the following environment variable:
PROCESSOR_URL=result_processor_url