Repository navigation
fix(process manager): apply limit and offset in get_jobs - #2427
C1-BA-B1-F3 wants to merge 1 commit into
Conversation
PostgreSQL and MongoDB managers ignored the limit and offset parameters, returning all jobs regardless of the query string. Apply offset before limit in both backends, matching the existing TinyDB behaviour. Fixes geopython#2426
|
Correcting the CI evidence in my earlier comment: the Root cause The That single failure produces both red tests: Why it is environmental, not this PR
This PR only touches |
Summary
The PostgreSQL and MongoDB process managers ignored the
limitandoffsetparameters inget_jobs, returning all jobs regardless of the query string. The TinyDB manager already applied both correctly.This PR adds
offsetthenlimitto both backends, matching the TinyDB behaviour.Changes
pygeoapi/process/manager/postgresql.py: add.offset()/.limit()to the SQLAlchemy querypygeoapi/process/manager/mongodb_.py: add.skip()/.limit()to the PyMongo cursorTest plan
pytest tests/manager/test_manager.py— 4/4 passpytest tests/manager/test_tinydb_manager_for_parallel_requests.py— 1/1 passFixes #2426