Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iurydias/job-scheduler
https://github.com/iurydias/job-scheduler
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/iurydias/job-scheduler
- Owner: iurydias
- Created: 2021-04-26T20:59:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-04-26T21:28:07.000Z (over 3 years ago)
- Last Synced: 2024-08-01T19:52:36.369Z (3 months ago)
- Language: Python
- Size: 39.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ⏱️ JOB SCHEDULER
A job scheduler made in order to understand and study python programming language and basic technologies use.
## Architecture
![alt text](https://github.com/iurydias/job-scheduler/blob/main/arch.png?raw=true "Project Architecture")
**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
```shell script
docker-compose up
```## Routes
### Create a job
```POST /jobs/create```
**Request**
Body (*application/json*)
* Any data
Exemplo:
```shell script
curl -XPOST -H "Content-type: application/json" -d '{"name":"iury"}' 'localhost:5000/currency'
```##### Response
+ **Success** 201
```json
{
"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:
```shell script
curl -XGET 'localhost:5000/jobs?id=88478d93-361b-4394-810b-4f2f102fba86'
```+ **Success** 200
```json
{
"id": "88478d93-361b-4394-810b-4f2f102fba86",
"status": "DONE"
}
```