This repository implements the REST interface provided by the guardians service.
Currently, the first use case has been implemented. This is, allowing to generate the schedule for a certain month.
The explanation of the service as a whole can be found here.
The documentation of the REST interface can be found here.
The scheduler repository can be found here.
To work on this project, there are mainly four steps to be taken:
- Install Java 1.8
- Install Lombok and enable its anotation preprocessing in the desired IDE
- Configure the database
- Configure the IDE
- Configure the integration with the scheduler
Further instructions on the first four steps can be found here.
- Follow the setup instructions for the scheduler. Found here.
- Configure the
resource/application.properties
:-
Change the property
scheduler.command
to be the path to a python interpreter, version 3.7+.E.g.
scheduler.command = python3.7
(supossing the binary is in the PATH) -
Change the property
scheduler.entryPoint
to the path to thesrc/main.py
file of the scheduler. For example, if the scheduler repository was in/home/guardians/Documents/scheduler
, the property should have the value/home/guardians/Documents/scheduler/src/main.py
:scheduler.entryPoint = /home/guardians/Documents/scheduler/src/main.py
-
The properties
scheduler.file.*
will be the temporary files used for communication between the REST service and the scheduler. Make sure both of them have read and write privileges on these files. For example:scheduler.file.doctors = /tmp/doctors.json scheduler.file.shiftConfs = /tmp/shiftConfs.json scheduler.file.calendar = /tmp/calendar.json scheduler.file.schedule = /tmp/schedule.json
-
[Optional] The property
scheduler.timeout
is an integer that will indicate the number of minutes to wait before killing the scheduler process and considering the schedule generation failed (after a request to generate a schedule).
-
To deploy the guardians application for a production environment, visit this repository.