This is the Pacifica Notifications Service for proxymod.
There are several parts to this code as it encompasses integrating several python libraries together.
For each major library we have integration points in specific modules to handle configuration of each library.
The configuration of PeeWee is pulled from the DATABASE_URL environment variable,
whose value is a database connection url.
The CherryPy configuration has two entry points for use. The WSGI interface and the embedded server through the main method.
The Celery tasks are located in their own module and have an entry point from the CherryPy REST objects. The tasks save state into a PeeWee database that is also accessed in the CherryPy REST objects.
The configuration of Celery is pulled from the BACKEND_URL and BROKER_URL
environment variables, whose values are the connection URLs for the backend and
message broker, respectively.
The default way to start up this service is with a shared SQLite database. The database must be located in the current working directory of both the celery workers and the CherryPy web server. The messaging system in Travis and Appveyor is Redis, however the default is RabbitMQ.
There are three commands needed to start up the services. Perform these steps in three separate terminals.
docker-compose up rabbitenv DATABASE_URL="sqliteext:///db.sqlite3" celery -A "pacifica.dispatcher_proxymod.__main__:celery_app" worker -l infoenv DATABASE_URL="sqliteext:///db.sqlite3" python3 -m "pacifica.dispatcher_proxymod.__main__"To test, perform these steps:
python3 -m unittest pacifica/dispatcher/proxymod/tests/test_*.pyContent type
Image
Digest
Size
336.4 MB
Last updated
about 7 years ago
docker pull pacifica/dispatcher-proxymod-backend