I have a cloud function that is doing background work through a task queue. Sometimes the work may take longer than the time limit for the function. Is there a way to have the code get notified that the time is about to expire so I can close up the work and make a note to start where I left off?
CodePudding user response:
Functions Gen2 runs on Cloud Run. A container instance is not notified the maximum request execution time has expired (or will expire, etc.).