The purpose of this is to show how to request and retrieve data for the microservice of prioritizing tasks
-
Download Required Files
- Retrieve
microservice.py
,response.txt
, andrequest.txt
from GitHub. - Ensure all files are available in the correct directory.
- Retrieve
-
Understand File Roles
request.txt
: Acts as the input pipeline where the main program writes task requests.response.txt
: Serves as the output pipeline where the microservice writes processed tasks.microservice.py
: Reads fromrequest.txt
, processes tasks, and writes sorted results toresponse.txt
.
-
Prepare Task Requests
- Format your task data as a CSV (Comma-Separated Values).
- Write the formatted data into
request.txt
.
-
Trigger the Microservice
- Run
microservice.py
. - It will check
request.txt
for new data.
- Run
-
Processing Logic in Microservice
- If
request.txt
contains data, the microservice:- Reads the task list.
- Sorts tasks by date and priority.
- Writes the processed results into
response.txt
.
- If
-
Retrieve Processed Data
- The main program reads
response.txt
to extract and use the prioritized task list.
- The main program reads