diff --git a/ops/ad_produce.py b/ops/ad_produce.py index f17f47d..3ebfbe6 100644 --- a/ops/ad_produce.py +++ b/ops/ad_produce.py @@ -139,10 +139,8 @@ def produce_task(): if int(line['ad_num']) == 0: sadd_adkey(key, line) elif int(line['ad_num']) > 0: - num = my_redis.get(f"adnum::{line['id']}_{locationid}::num") + num = my_redis.get(f"adnum::{line['id']}_{locationid}::num") or 0 print(f" get {line['id']} {locationid} num was {num}!") - if not num: - num = 0 if int(line['ad_num']) > int(num): sadd_adkey(key, line) else: