actinia-org / actinia-core

Actinia Core is an open source REST API for scalable, distributed, high performance processing of geographical data that uses mainly GRASS GIS for computational tasks (DOI: https://doi.org/10.5281/zenodo.5879231) | Tutorial: https://actinia-org.github.io/actinia-core/ | Docker: https://hub.docker.com/r/mundialis/actinia-core
https://actinia.mundialis.de/
GNU General Public License v3.0
81 stars 23 forks source link

Always use local queue for sync requests #361

Closed mmacata closed 2 years ago

mmacata commented 2 years ago

This PR introduces a decorator for requests which should return an immediate response (HTTP GET and HTTP DELETE) and use the enqueue_job method. When the queue_type is set to any other than local, the request would be pending until the job is worked on which might take a while if a new worker needs to be started. With the new decorator, the queue_type will be overwritten to local for these synchronous requests. A decorator is used so it can be easily enhanced later without touching all the get methods again.