Skip to content

iurydias/job-scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⏱️ JOB SCHEDULER

A job scheduler made in order to understand and study python programming language and basic technologies use.

Architecture

alt text

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 ✅

Initiating the application

    docker-compose up

Routes

Create a job

POST /jobs/create

Request

Body (application/json)

  • Any data

Exemplo:

curl -XPOST -H "Content-type: application/json" -d '{"name":"iury"}' 'localhost:5000/currency'
Response
  • Success 201
{
  "id": "88478d93-361b-4394-810b-4f2f102fba86",
  "data": {
    "name": "iury"
  }
} 

Check job status

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"
} 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published