Clear the caches in the event the cache type is database. This will
delete any rows in the cache table that could be left over from a
prior run of the app preventing an accumulation of stale data.
All 3 beaker caches, mulled_resolution, citations, biotools service,
now use the same default cache table, beaker_cache. This reduces the
number of open db connections because beaker creates a separate
sqlalchemy engine and associated connection pool for each distinct
table and each connection pool opens up a certain number of connections.
This was causing the integration tests to fail because the max
postgress connections(100) were being exceeded.
mypy kept complaining that module 'galaxy' has no attribute 'config'
on an 'from galaxy import config' statement. So I changed it to
'import galaxy.config'
based beaker cache.
Change test-requirements.txt to require v beaker 1.11.0 because latest
version of beaker apparently introduced a bug that broke the ability
to use database as a cache. Also fixed lint errors.
ext:database.
Rather than store cache data in the file system store cache data
in the database. These are the last 2 beaker caches that need
to be converted to the database as part of issue 15216.
Introduce new config parameters for database url, cache table name.
Introduce logic to default values of a parameter to values of another
parameter. i.e. default cache database url to database_connection.
Metadata for this was placed in code. Should probably be
placed eventually in config file which would require a change
to the config_schema.yml.
Introduced a new unit test, test_citations_db.py
Did not introduce a new test for the biotools_service beaker cache
because I could not find a place in the code where it was used.
Rather than store cache data in the file system store cache data
in the database. Partially addresses issue 15216. For now this was
only changed for the mulled resolution cache. Introduced new
config parameters for database url, cache table name. Introduced
logic to default values of a parameter to values of another
parameter. i.e. default cache database url to database_connection.
Metadata for this was placed in code. Should probably be
placed eventually in config file which would require a change
to the config_schema.yml.
Introduced a new unit test, test_mulled_resolution_cache_db.py.
A deadlock has happened at least on two occasions which may be related
to the autocommit setting recently set to False. Resetting this to True
until we can figure out what's causing the deadlock and fix it.