Skip to content

dgnest/foottrial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foottrial

Table of content

Getting Started

For setting up the project we need first to install the following requirements.

Prerequisites

This is a list of applications that need to be installed previously to enjoy all the goodies of this configuration.

Installing

First, we need to synchronize the database.

$ cd src
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser

Then, we run a local development server doing this.

$ python manage.py runserver

To load initial data just run the following command:

$ python manage.py loaddata messages.json hospitals.json

Run Task queue processes

Use celery we need to create a RabbitMQ user, a virtual host and allow that user access to that virtual host:

$ sudo rabbitmqctl add_user myuser mypassword
$ sudo rabbitmqctl add_vhost myvhost
$ sudo rabbitmqctl set_permissions -p myvhost myuser ".*" ".*" ".*"

Then we set up a BROKER_URL env var and run celery to the same level of manage.py

$ export BROKER_URL='amqp://myuser:mypassword@localhost:5672/myvhost'
$ celery -A foottrial worker -l info

Run the scheduler

$ celery -A foottrial beat

Running the tests

Execute test Behave

make test

Authors

License

This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details