2 ms·
This layout is similar to something I've done in production. In my use case we don't support stopping of jobs and I return job completion status in aggregate.
by gravypod 8y ago
This layout is similar to something I've done in production. In my use case we don't support stopping of jobs and I return job completion status in aggregate.
I also avoid confusion in status codes and implementation by separating my resources for requests of a resource and the resource itself into different endpoints.
POST /<resource>-requests
{
...
}
GET /<resouce>-requests
[
{
"id": <id>,
"status": "complete",
...
"url": "/<resource>/<id>"
}
It all comes down to your queue processing system and making sure it's sensibly configured. For long running jobs (1+hr) the stack we use at work (Laravel/Lumen) come very poorly configured.