From 3702332669eed335d2265e41428288cdb9c8ae6d Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 26 Aug 2021 23:58:34 -0400 Subject: [PATCH] new redis keys --- src/util/redis_keys.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/util/redis_keys.rs b/src/util/redis_keys.rs index f93fddf321..7939ba0ad3 100644 --- a/src/util/redis_keys.rs +++ b/src/util/redis_keys.rs @@ -5,13 +5,27 @@ impl RedisKeys { /// This is a counter incremented with TTS inference. /// We can use a job to read MySql and fix counts if they get out of sync. + /// These should be long-lived keys. pub fn tts_model_usage_count(model_token: &str) -> String { format!("ttsUseCount:{}", model_token) } /// This is a counter incremented with TTS inference. /// We can use a job to read MySql and fix counts if they get out of sync. + /// These should be long-lived keys. pub fn w2l_template_usage_count(template_token: &str) -> String { format!("w2lUseCount:{}", template_token) } + + /// We write extra in-progress status information to keys. + /// These keys should have a TTL. + pub fn tts_inference_extra_status_info(inference_job_token: &str) -> String { + format!("ttsInferenceExtraStatus:{}", inference_job_token) + } + + /// We write extra in-progress status information to keys. + /// These keys should have a TTL. + pub fn w2l_inference_extra_status_info(inference_job_token: &str) -> String { + format!("w2lInferenceExtraStatus:{}", inference_job_token) + } }