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
78 stars 23 forks source link

Allow one job queue per user #421

Closed mmacata closed 1 year ago

mmacata commented 1 year ago

This PR allows to specify a separate queue for each user, user_id included in queue name. See also https://github.com/actinia-org/actinia-core/pull/355

When a request is made which writes a job in the queue, actinia logs the following:

[2023-04-27 10:31:39,944] INFO      : actinia-core.redis_interface -Create queue job_queue_lina with server redis-queue:6379 [in /src/actinia_core/src/actinia_core/core/common/redis_interface.py:91]
[2023-04-27 10:31:39,945] INFO      : actinia-core.redis_interface -Enqueue job in queue job_queue_lina [in /src/actinia_core/src/actinia_core/core/common/redis_interface.py:113]

Then the actinia-worker can be started with:

rq_custom_worker job_queue_lina -c /etc/default/actinia --quit

Co-authored-by: @linakrisztian

anikaweinmann commented 1 year ago

Thank you looks good for me. It is possible to add a test for this?

mmacata commented 1 year ago

Thank you looks good for me. It is possible to add a test for this?

Technically somehow yes I guess. The problem is that a different config is needed and a mechanism how to start the worker. I opened a ticket for this. Would also be interesting for queue type per_job.