At a high level, which combination of Workers features would be the best approach for the following use case?
- A long-running process that needs to happen in response to a user action.
- The process takes about 1-2 minutes to complete, which is longer than the 30s HTTP request CPU time limit, but it does fit into the 128MB memory limit.
I have been reading through the docs and have had some ideas, but I'm not sure if they are optimal or possible:
1. On the user's action, send an HTTP request to a Worker, which creates a Durable Object to handle the long process. Subsequent HTTP requests could poll the Durable Object to check for progress on the task. I'm not sure if there is a way to keep a Durable Object running in the background, outside of an active HTTP request?
2. On the user's action, send an HTTP request to a Worker that inserts a message into a Queue. The queue handler would do the long process work. I'm not sure if the queue handler would be limited to 30s as well, or if it would be subject to the 15-minute limit instead?
Am I on track or are there better approaches that I'm not thinking of?