mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add redis cache to postgres testcase
This commit is contained in:
parent
e8c2d4da10
commit
eecd477a34
6
.github/workflows/postgresql.yaml
vendored
6
.github/workflows/postgresql.yaml
vendored
@ -27,6 +27,7 @@ jobs:
|
|||||||
INVENTREE_DEBUG: info
|
INVENTREE_DEBUG: info
|
||||||
INVENTREE_MEDIA_ROOT: ./media
|
INVENTREE_MEDIA_ROOT: ./media
|
||||||
INVENTREE_STATIC_ROOT: ./static
|
INVENTREE_STATIC_ROOT: ./static
|
||||||
|
INVENTREE_CACHE_HOST: localhost
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
@ -37,6 +38,11 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -541,7 +541,9 @@ DATABASES = {
|
|||||||
|
|
||||||
_cache_config = CONFIG.get("cache", {})
|
_cache_config = CONFIG.get("cache", {})
|
||||||
_cache_host = _cache_config.get("host", os.getenv("INVENTREE_CACHE_HOST"))
|
_cache_host = _cache_config.get("host", os.getenv("INVENTREE_CACHE_HOST"))
|
||||||
_cache_port = _cache_config.get("port", os.getenv("INVENTREE_CACHE_PORT"))
|
_cache_port = _cache_config.get(
|
||||||
|
"port", os.getenv("INVENTREE_CACHE_PORT", "6379")
|
||||||
|
)
|
||||||
|
|
||||||
if _cache_host:
|
if _cache_host:
|
||||||
# We are going to rely upon a possibly non-localhost for our cache,
|
# We are going to rely upon a possibly non-localhost for our cache,
|
||||||
|
Loading…
Reference in New Issue
Block a user