A job scheduler made in order to understand and study python programming language and basic technologies use.
Basically, it:
✨ gets data from a post request
➡️ send to a queue
➡️ a consumer gets that data
➡️ save in a non-relational database (mongodb)
➡️ publish in another queue notifying the finished job
➡️ first service gets that finished job
➡️ update job's status ✅
docker-compose up
POST /jobs/create
Request
Body (application/json)
- Any data
Exemplo:
curl -XPOST -H "Content-type: application/json" -d '{"name":"iury"}' 'localhost:5000/currency'
- Success 201
{
"id": "88478d93-361b-4394-810b-4f2f102fba86",
"data": {
"name": "iury"
}
}
GET /jobs
Request
Param (Via Query)
- id: The job identification (received when created)
Exemplo:
curl -XGET 'localhost:5000/jobs?id=88478d93-361b-4394-810b-4f2f102fba86'
- Success 200
{
"id": "88478d93-361b-4394-810b-4f2f102fba86",
"status": "DONE"
}