1
def get(self, name):
    //accept the parameters and parse the parameters
    //genereate UUID
    return{UUID : 'request accepted'}, 200 if item else 404
    generate_doc(parameters, UUID)
   //process the request after the return happens with the parameters from GET

I need to do something like this. I have to call a functions which does something after the response to the GET request is made. I want to do this because the file that I am trying to create is taking sometime. So I want to send the request first and then generate the file.

I don't have any control on the program flow once the app starts running. Can someone help me to solve this issue.

Tsubaki007
  • 47
  • 4

1 Answers1

-1

Create a job scheduler class. Add a method queue jobs. Call this method to queue the job. Now call this method whenever you want to make a request.

Run the scheduler in the background to complete the jobs in the added queue.

Phaneeth
  • 195
  • 1
  • 14