Commit ce4b9fe0 by 岳巧源

fix bug

parent 841d1487
Showing with 4 additions and 0 deletions
......@@ -88,6 +88,8 @@ def handle_hk_csv(file_name, conf: dict, supplier_id: int):
message_map["ladder_price"] = ladder_price
message_map["price_is_us"] = True
message_map["supplier_name"] = 'Rs'
if message_map["brand_name"] == "" or message_map["goods_name"] == "":
continue
json_str = json.dumps(message_map)
p.push(json_str, exchange=conf["rabbit_mq"]["producer"]["rabbit_mq_exchange"],
routing_key=conf["rabbit_mq"]["producer"]["rabbit_mq_routing_key"])
......@@ -156,6 +158,8 @@ def handle_cn_csv(file_name, conf: dict, supplier_id: int):
message_map["ladder_price"] = ladder_price
message_map["price_is_us"] = False
message_map["supplier_name"] = 'RS-CN'
if message_map["brand_name"] == "" or message_map["goods_name"] == "":
continue
json_str = json.dumps(message_map)
p.push(json_str, exchange=conf["rabbit_mq"]["producer"]["rabbit_mq_exchange"],
routing_key=conf["rabbit_mq"]["producer"]["rabbit_mq_routing_key"])
......
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 sign in to comment