Commit Graph

5 Commits

Author SHA1 Message Date
francescoingv 0169e43329 Update test_tinydb_manager_for_parallel_requests.py (#1720)
* Update test_tinydb_manager_for_parallel_requests.py

Updated the call to execute_process
and now checks the expected number of process results are present.

* Update test_tinydb_manager_for_parallel_requests.py

---------

Co-authored-by: FrancescoIngv <FrancescoIngv@users.noreply.github.com>
Co-authored-by: Tom Kralidis <tomkralidis@gmail.com>
2024-07-12 05:45:24 -04:00
Tom Kralidis de1a7d93ee add OpenAPI dict to pygeoapi.api.API init (#1398) 2023-11-12 20:07:34 +01:00
totycro f6a055e8e1 Improve tinydb locking (#1273)
* Update tinydb manager test to current api

* Add tinydb parallel tests to CI

* Use filelock library to help make tinydb threadsafe

The tests for parallel access sometimes failed with the previous
implementation. I'm currently not 100% sure why, but it might have
to do with the fact that the file is already created in the TinyDB
constructor which was not protected by a lock.

Also not protecting the reads can read to invalid reads in the case
when a read and a write happen simultaneously and the read catches
partially written data.

This implementation allows for fewer concurrency but is quite simple,
so we should be able to be confident about its safety.

Also the TinyDB manager is not intended for high performance and its
IO operations are orders of magnitude faster than requests over the
network or process executions anyway.
2023-07-01 04:48:06 -04:00
Tom Kralidis f9fb2c6005 move to f-strings for string interpolation (#1064)
* update from format() to f-strings

* fix

* fix

* fix ref

* update headers
2022-12-08 16:09:19 -05:00
Martin Pontius 12abb81227 Add unit test for tinydb job manager with parallel requests (#872)
* Add unit test for tinydb job manager with parallel requests

* Add source code header

* Fix flake8 issues
2022-03-14 06:25:03 -04:00