From 9ce2eb1e79376aaf7c8589087c9824bf98d6e117 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 26 Jun 2020 15:44:07 +0200 Subject: [PATCH] fix: [regex_helper] --- bin/lib/regex_helper.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/lib/regex_helper.py b/bin/lib/regex_helper.py index 67256376..b8cd5417 100755 --- a/bin/lib/regex_helper.py +++ b/bin/lib/regex_helper.py @@ -76,8 +76,7 @@ def regex_findall(module_name, redis_key, regex, item_id, item_content, max_time def _regex_search(redis_key, regex, item_content): first_occ = regex.search(item_content) - if r_set: - r_serv_cache.set(redis_key, first_occ) + r_serv_cache.set(redis_key, first_occ) def regex_search(module_name, redis_key, regex, item_id, item_content, max_time=30): proc = Proc(target=_regex_search, args=(redis_key, regex, item_content, ))