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
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.
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 thequeue_type
is set to any other thanlocal
, 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, thequeue_type
will be overwritten tolocal
for these synchronous requests. A decorator is used so it can be easily enhanced later without touching all the get methods again.