Commit d11c6fcf authored by egon w. stemle's avatar egon w. stemle

Add REDIS_KAPI_HOST ENV var

parent 4874f892
Pipeline #7929 passed with stage
in 52 seconds
......@@ -40,6 +40,9 @@ config.load_dict({
"salt": getenv("SALT", config.get("{}.salt".format(RUN_MODE),
"eikeiphe1ohShais")),
"token_valid_days": int(config.get("{}.token_valid_days".format(RUN_MODE), "7")),
"redis_kapi_host": getenv("REDIS_KAPI_HOST",
config.get("{}.redis_kapi_host".format(RUN_MODE),
"localhost")),
"redis_host": getenv("REDIS_HOST",
config.get("{}.redis_host".format(RUN_MODE),
"localhost")),
......
......@@ -562,9 +562,11 @@ def createJob(accessToken, service, docs=None, docids=None, parameters=None):
logging.debug("jobid:%s docids:%s\njob:%s", jobid, docids, job)
redis_q = get_redis_queue()
redis_job = redis_q.enqueue(_processJob, accessToken, job,
service_url="http://kapi-app:{}/services/{}".format(
service_url="http://{}:{}/services/{}".format(
config["kapi.redis_kapi_host"],
config["kapi.port"], service),
doc_url="http://kapi-app:{}/docs/".format(
doc_url="http://{}:{}/docs/".format(
config["kapi.redis_kapi_host"],
config["kapi.port"]),
job_id=jobid,
result_ttl=86400)
......
Markdown is supported
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