Commit ad1c43f4 authored by Alok Joshi's avatar Alok Joshi
Browse files

add database number to RedisCache call

parent e828d236
Pipeline #13252 failed with stage
in 41 seconds
......@@ -63,6 +63,11 @@ spec:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_KEYVAULT
- name: REDIS_DATABASE
valueFrom:
configMapKeyRef:
name: redis-configmap
key: storage
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
......
......@@ -16,6 +16,7 @@ package org.opengroup.osdu.storage.provider.azure.cache;
import org.opengroup.osdu.core.common.cache.RedisCache;
import org.opengroup.osdu.core.common.model.storage.Schema;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
......@@ -29,8 +30,9 @@ public class SchemaRedisCache extends RedisCache<String, Schema> {
final @Named("REDIS_HOST") String host,
final @Named("REDIS_PORT") int port,
final @Named("REDIS_PASSWORD") String password,
final @Named("REDIS_TIMEOUT") int timeout)
final @Named("REDIS_TIMEOUT") int timeout,
@Value("${redis.database}") final int database)
{
super(host, port, password, timeout, String.class, Schema.class);
super(host, port, password, timeout, database, String.class, Schema.class);
}
}
\ No newline at end of file
......@@ -63,4 +63,7 @@ azure.cosmosdb.recordmetadata.collection=StorageRecord
azure.cosmosdb.tenantinfo.collection=TenantInfo
#TenantFactory Configuration
tenantFactoryImpl.required=true
\ No newline at end of file
tenantFactoryImpl.required=true
#Redis database number
redis.database=${REDIS_DATABASE}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment