NationalGenomicsInfrastructure/ngi_pipeline — pull request #110 by guillermo-carrasco (2014-10-31 10:54:26+00:00)
Title: NGI Pipeline server

This code implements the tornado server to run tasks on the background. I've defined a /test/_seconds_ call that will spawn a task that will "sleep" for n seconds so you can try this locally.

#### Ho-To
Start the server:
```
python ngi_pipeline_start.py server --port 8080
```
Call the test task with a determined number of seconds. This will return a task id that you can use to check the status of the task:
```
id=`curl -X GET http://localhost:8080/test/100`
```
Use the returned id to check the status of the task:
```
curl -X GET http://localhost:8080/status?run_id=$id
running
```
After 100 seconds...
```
curl -X GET http://localhost:8080/status?run_id=$id
finished
```

**STILL** needs to be tested in UPPMAX with real data, but you can check the codebase on the meantime.