Commit c13de7eb by 岳巧源

add config

parent e84b5900
Showing with 3 additions and 5 deletions
...@@ -9,11 +9,6 @@ import push ...@@ -9,11 +9,6 @@ import push
logger = logging.getLogger('waldom_data_process_USD.py') logger = logging.getLogger('waldom_data_process_USD.py')
# Tianyang_InventoryFeed title字段含义
# Manufacturer ----------------> brand_name
# 库存相加 HIJK 列
# 加一个 multiple 列
# TODO 缺少goods_sn 推送不要一次性推送 要一条一条推送
title_map = {'Part Number', 'Manufacturer', 'Stock EMEA', 'Stock USA', 'Stock APAC', 'Stock CN', 'MOQ', 'Multiplier', title_map = {'Part Number', 'Manufacturer', 'Stock EMEA', 'Stock USA', 'Stock APAC', 'Stock CN', 'MOQ', 'Multiplier',
'Price Break Qty 1', 'Price Break Qty 2', 'Price Break Qty 3', 'Price Break Qty 1', 'Price Break Qty 2', 'Price Break Qty 3',
...@@ -125,11 +120,14 @@ class HandleCSV: ...@@ -125,11 +120,14 @@ class HandleCSV:
if __name__ == '__main__': if __name__ == '__main__':
start = time.time() start = time.time()
# 下载文件
download_file(url) download_file(url)
time.sleep(1) time.sleep(1)
# 处理并推送文件
HandleCSV().parse(file_name) HandleCSV().parse(file_name)
time.sleep(1) time.sleep(1)
producer.close() producer.close()
# 移除文件
os.remove(file_name) os.remove(file_name)
end = time.time() end = time.time()
logger.info("usd file total spend time: " + str(end - start)) logger.info("usd file total spend time: " + str(end - start))
......
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